Reply to topic  [ 2 posts ] 
Date Objects and macros 
Author Message
User avatar

Joined: 2007-02-07 00:58:12
Posts: 876
Location: Japan
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.


Attachments:
Date macros.zip [19.83 KiB]
Downloaded 166 times

_________________
philip
2013-12-08 20:43:12
Profile
Official Nisus Person
User avatar

Joined: 2002-07-11 17:14:10
Posts: 4251
Location: San Diego, CA
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.


2013-12-09 17:57:19
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software