[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[UDUNITS #MZK-350035]: building udunits 2.2.24 on windows with VS2013



Ajit,

> It appears I was setting UDUNITS2_XML_PATH to the folder location and not the 
> actual filename.
> Thank you for pointing that out!
> 
> My local udunits2 and udunits-1 tests from the samples appear to pass now.

Good.

> (1)
> With udunits-1, I can do this…
> utUnit unit;
> utIni(&unit);
> utScan("days since 1895-01-01", &unit);
> utCalendar(val, &unit, &year, &month, &day, &hour, &minute, &second);
> 
> How can I achieve the same using udunits2?

The package has documentation in HTML pages, which should have been installed
by CMake. You can also view it at
<http://www.unidata.ucar.edu/software/udunits/udunits-2.2.24/doc/udunits/udunits2.html>.

In general, you obtain a well-known unit via the function ut_parse(). That
takes care of your first 3 items. Converting a time-value to years, months,
days, etc. is done with the function ut_decode_time().

> (2)
> Does udunits-1 allow me to define and use a specific locale like udunits2 
> does using utEncoding?

Sorry, no.

Regards,
Steve Emmerson

Ticket Details
===================
Ticket ID: MZK-350035
Department: Support UDUNITS
Priority: Normal
Status: Closed
===================
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata 
inquiry tracking system and then made publicly available through the web.  If 
you do not want to have your interactions made available in this way, you must 
let us know in each email you send to us.