You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was looking to implement the separation of date from unit in pyudunits2 and took a look over the existing cf-units logic to determine if something is a time reference:
Which is surprising, because the existence of shift isn't a guarantee that it is a date. Take temperatures for example:
>>> degC = cf_units.Unit('kelvin since 273.15')
>>> degC.is_time_reference()
True
udunits2 does not delineate the type of shift that it does based on how shift is spelt. It is quite common to see degC defined as kelvin @ 273.15, which would return False for is_time_reference... but then so would:
I'm not clear is there is an actual way to fix this with udunits2. Date handling is messy, and highly context dependent as I am learning in pelson/pyudunits2#4
The text was updated successfully, but these errors were encountered:
I was looking to implement the separation of date from unit in
pyudunits2
and took a look over the existing cf-units logic to determine if something is a time reference:cf-units/cf_units/__init__.py
Line 891 in cdf7172
Then, I wondered how this calendar came to being...
cf-units/cf_units/__init__.py
Line 757 in cdf7172
Which is surprising, because the existence of shift isn't a guarantee that it is a date. Take temperatures for example:
udunits2
does not delineate the type of shift that it does based on how shift is spelt. It is quite common to seedegC
defined askelvin @ 273.15
, which would returnFalse
foris_time_reference
... but then so would:I'm not clear is there is an actual way to fix this with
udunits2
. Date handling is messy, and highly context dependent as I am learning in pelson/pyudunits2#4The text was updated successfully, but these errors were encountered: