[ncl-talk] Help on time units qualifiers

Mateus da Silva Teixeira mateusstex at gmail.com
Fri Nov 16 03:30:53 MST 2018


Dave and Dennis,

Thanks. So I suggest to explicitly inform that on Calendar functions, so the user will not expect different behaviors from these unit qualifiers.

Best regards,

Mateus



> Em 16 de nov de 2018, à(s) 02:27, Dennis Shea <shea at ucar.edu> escreveu:
> 
> I was in the process of answering when DaveA's response appeared.
> 
> The gist of my response is that "from", "after", "ref" are synonyms for "since". 
> 
> From WikiPedia: A synonym is a word or phrase that means exactly or nearly the same as another lexeme (word or phrase) in the same language.
> 
> Cheers
> 
> On Thu, Nov 15, 2018 at 9:12 PM Dave Allured - NOAA Affiliate <dave.allured at noaa.gov <mailto:dave.allured at noaa.gov>> wrote:
> Mateus,
> 
> Those units qualifiers are from the original UDUNITS package which set the precedent for formatted date/time unit strings.  UDUNITS originally called them "origin shift operators".
> 
> The four words all mean exactly the same thing in this context.  They are the human-readable separator between the base unit, e.g. "days", and the string representing the timeline origin, e.g. "0001-01-01".
> 
> --Dave
> 
> 
> On Thu, Nov 15, 2018 at 7:11 PM Mateus da Silva Teixeira <mateusstex at gmail.com <mailto:mateusstex at gmail.com>> wrote:
> Hi,
> 
> Some time ago I asked about an issue noted when using units qualifiers. I would like to know if someone take a look on it.
> 
> Thanks,
> 
> Mateus
> 
> 
>> Em 21 de ago de 2018, à(s) 09:48, Mateus da Silva Teixeira <mateusstex at gmail.com <mailto:mateusstex at gmail.com>> escreveu:
>> 
>> Hi,
>> 
>> I'm testing date functions and noted that the usage of different units qualifiers: "since", "after", "from" and "ref" has no impact on results from cd_inv_calendar_function(). See my example below:
>> 
>> dataTeste = cd_inv_calendar( 2018, 08, 21, 09, 30, 0, "days since 0001-01-01 00:00:00", 0 )
>> print( dataTeste+"  <=== since" )
>> dataTeste = cd_inv_calendar( 2018, 08, 21, 09, 30, 0, "days after 0001-01-01 00:00:00", 0 )
>> print( dataTeste+"  <=== after" )
>> dataTeste = cd_inv_calendar( 2018, 08, 21, 09, 30, 0, "days from 0001-01-01 00:00:00", 0 )
>> print( dataTeste+"  <=== from" )
>> dataTeste = cd_inv_calendar( 2018, 08, 21, 09, 30, 0, "days ref 0001-01-01 00:00:00", 0 )
>> print( dataTeste+"  <=== ref" )
>> 
>> and the output:
>> 
>> (0)    736928.3958333334  <=== since
>> (0)    736928.3958333334  <=== after
>> (0)    736928.3958333334  <=== from
>> (0)    736928.3958333334  <=== ref
>> 
>> Is it correct?
>> 
>> If yes, what the purpose of these units qualifiers?
>> 
>> Thank you!
>> 
>> Mateus
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu <mailto:ncl-talk at ucar.edu>
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk <http://mailman.ucar.edu/mailman/listinfo/ncl-talk>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20181116/7e5fafc9/attachment.html>


More information about the ncl-talk mailing list