landam / grass-gis-git-migration-test

0 stars 0 forks source link

r.timestamp: support also YYYY-DOY #126

Open landam opened 5 years ago

landam commented 5 years ago

Reported by neteler on 19 Jun 2014 15:59 UTC It would be of great help (esp. for time series) to add year/doy (Day Of Year) support to r.timestamp. From this t.register would benefit as well.

The "only" change needed seems to be an upgrade of G_scan_timestamp():

http://grass.osgeo.org/programming7/scan_8c_source.html#l00043

probably by adding a new function scan_doy() //Day Of Year

GRASS GIS version and provenance

svn-releasebranch70

Migrated-From: https://trac.osgeo.org/grass/ticket/2346

landam commented 5 years ago

Comment by wenzeslaus on 20 Jun 2014 19:16 UTC If doing this, try to follow some consistent terminology/naming.

I've recently encountered different namings in GRASS: DOY, Day of Year, day of year, doy, daynum and day.

landam commented 5 years ago

Comment by huhabla on 20 Jun 2014 20:51 UTC This must be implemented in the C datetime library and in the temporal framework parser in datetime_math.py[1]. I hoped that the dateutils[2] already support this to have it out of the box, but unfortunately they don't.

Hence we should orient on the ISO 8601 standard for ordinal dates when implementing this (YYYY-DDD) but not YYYYDDD, since the temporal framework and the C datetime library also support relative time and can't decide if 1900031 is 31. Jan. 1900 or if it is the number of seconds, days, ... .

[1] http://grass.osgeo.org/programming7/datetime__math_8py_source.html#l00704 [2] https://labix.org/python-dateutil

landam commented 5 years ago

Comment by neteler on 30 Dec 2015 13:24 UTC See also #40

landam commented 5 years ago

Modified by @landam on 12 May 2016 06:36 UTC

landam commented 5 years ago

Modified by @landam on 25 Aug 2016 15:51 UTC

landam commented 5 years ago

Comment by @landam on 27 Aug 2016 13:42 UTC Milestone renamed

landam commented 5 years ago

Comment by neteler on 26 Jan 2018 11:40 UTC Ticket retargeted after milestone closed

landam commented 5 years ago

Modified by neteler on 12 Jun 2018 20:48 UTC

landam commented 5 years ago

Modified by @landam on 25 Sep 2018 16:49 UTC

landam commented 5 years ago

Comment by @landam on 25 Jan 2019 21:07 UTC Ticket retargeted after milestone closed