NISUS Archives

July 2011

NISUS@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Þorvarður Davíðsson <[log in to unmask]>
Reply To:
Date:
Mon, 11 Jul 2011 18:24:13 +0200
Content-Type:
text/plain
Parts/Attachments:
text/plain (30 lines)
Hello,

I would like to have a macro that tells me what date there will be in 145 days from now, for example. The latest version of TypeIt4Me (v. 5.2) has a similar, nice feature which allows adding or subtracting days and/or months for future or past events. Can this be done in NWP with a macro?


The beginning could look like this:


$start = Date.now
$day = $start.day
$month = $start.month
$year = $start.year

$addedDays = Prompt Input ‘How many days do you want to add?’

# … Now the problem is how can I add days to the current date? …

$end = ???
Type Text $end

END of macro
--

Is it possible to subtract a later date from an earlier date in order to calculate the difference in days and months?



Ţorvarđur Davíđsson
 OS X 10.6.7
 MacBook Pro 17’' 

ATOM RSS1 RSS2