Unidata - To provide the data services, tools, and cyberinfrastructure leadership that advance Earth system science, enhance educational opportunities, and broaden participation. Unidata
         
  advanced  
 

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

[UDUNITS #DJU-684251]: udunits



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


 
 
  Contact Us     Site Map     Search     Terms and Conditions     Privacy Policy     Participation Policy
 
National Science Foundation (NSF) UCAR Community Programs   Unidata is a member of the UCAR Community Programs, is managed by the University Corporation for Atmospheric Research, and is sponsored by the National Science Foundation.
P.O. Box 3000     Boulder, CO 80307-3000 USA     Tel: 303-497-8643     Fax: 303-497-8690