Hi Antaeus,
There's are these core functions:
*parseDate* — parses a datestring into a js date object
*stringifyDate* — does the reverse
So, something like this should do the trick of shifting by a given number
of days...
function(datestring, shiftbydays) {
var date = $tw.utils.parseDate(datestring),
result = new Date(date.getTime() + shiftbydays*86400000);
return $tw.utils.stringifyDate(result);
}
Best wishes,
— tb
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/5f7600db-9312-407d-a77f-6bfd01acf2bf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.