This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Henry, > I want to use udunits to parse a timestamp, then extract from the > timestamp year/month/day/hours/min/sec > So I can do calculations with non-gregorian calendars e.g "365_day", > "360_day" , with-hout having to go to the trouble of writing a custom > date parser The UDUNITS-2 package was never intended to be a calendaring package. You'd be much better off using something designed for that (e.g., the "cdtime" package from LLNL). You *can* convert values in some timestamp unit to double-precision seconds since the epoch using a value-converter returned by ut_get_converter(). You should then be able to use those values in another package to do what you want. > Regards Henry Regards, Steve Emmerson Ticket Details =================== Ticket ID: DJU-684251 Department: Support UDUNITS Priority: Normal Status: Closed