- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have a date in "YYYY-MM-DD HH:mm:ss" format with the 19 characters in an integer array. Is there an easy way to add one day to this?
Link Copied
- « Previous
-
- 1
- 2
- Next »
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Do not forget that the time and date is not a linear function any longer. You may need to allow for the leap seconds that are added in from time to time. There is a kernel that supplies this data.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
dboggs wrote:A permanent entry on my wish list for Fortran is a new data type, Dattime (or whatever).
Unless the desired type is restricted to the scope of the modern Western calendar, the task can become quite complex and beyond the scope of knowledge possessed by a typical programmer. See, for example, https://www.fourmilab.ch/documents/calendar/ and http://www.epistemeacademy.org/calendars/page_today.html . In many societies, social and religious practices are tied to the local calendar system.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
dboggs wrote:Thanks to all for these contributions.
A permanent entry on my wish list for Fortran is a new data type, Dattime (or whatever). Like some other languages (especially Excel, to use the term loosely) it would handle not only arithmetic, but some functions (e.g. Julian date conversion) and a family of edit descriptors for I/o. Would save lots of people lots of time.
@dboggs and anyone interested in such a date-time facility, this looks like a good feature for a community-developed "standard" library for Fortran.
See this initiative: https://github.com/fortran-lang/stdlib
You may want to consider participating in this or supporting the community developers in a manner you see fit e.g., sharing your ideas, extending your feedback on the development, etc.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- « Previous
-
- 1
- 2
- Next »