Page 1 of 1

Date Objects and macros

Posted: 2013-12-08 20:43:12
by phspaelti
The Nisus macro language has a date object construct. Unfortunately there is no easy way to create new date objects (except for 'now' objects). I am posting a package of macros with the principal one being a Make Date Object helper macro. This macro allows the user to specify a date as a string of the form "YYYY/MM/DD" and then get an object with that date. The other macros are mainly intended as sample to show things one might do with such objects.
Hope they are useful.

Re: Date Objects and macros

Posted: 2013-12-09 17:57:19
by martin
Thanks for sharing Philip! Although I must say, having any macro author (or more generally, any programmer) parse date strings is a great horror; really these tasks should be provided by the language, framework, or system. I apologize that you wrote this code :P

It is true that NWP macro Date objects can't easily be created for arbitrary points in time. However, the macro language does give you access to date information when useful, eg: the time a comment was made, file modification date, etc. But I understand the desire to create arbitrary dates as well– perhaps for matching comments or some such task. I'll file an enhancement.