Opened 10 years ago

Last modified 6 years ago

#2346 new enhancement

r.timestamp: support also YYYY-DOY

Reported by: neteler Owned by: grass-dev@…
Priority: normal Milestone: 7.6.2
Component: LibGIS Version: svn-releasebranch70
Keywords: r.timestamp, t.register, temporal, doy Cc:
CPU: Unspecified Platform: All

Description

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

Change History (11)

comment:1 by wenzeslaus, 10 years ago

Keywords: temporal doy added

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.

comment:2 by huhabla, 10 years ago

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

comment:3 by neteler, 9 years ago

Milestone: 7.0.07.0.4

See also #964

comment:4 by martinl, 9 years ago

Milestone: 7.0.47.0.5

comment:5 by martinl, 8 years ago

Milestone: 7.0.57.3.0

comment:6 by martinl, 8 years ago

Milestone: 7.3.07.4.0

Milestone renamed

comment:7 by neteler, 7 years ago

Milestone: 7.4.07.4.1

Ticket retargeted after milestone closed

comment:8 by neteler, 7 years ago

Milestone: 7.4.17.4.2

comment:9 by martinl, 6 years ago

Milestone: 7.4.27.6.0

comment:10 by martinl, 6 years ago

Milestone: 7.6.07.6.1

Ticket retargeted after milestone closed

comment:11 by martinl, 6 years ago

Milestone: 7.6.17.6.2

Ticket retargeted after milestone closed

Note: See TracTickets for help on using tickets.