matthewmueller/date

Add context extensions.

viktor-evdokimov opened this issue · 5 comments

Consider setting up beginning and end date for tasks

Start: Next Monday
End: Two weeks from Start

and start value to take from context.

I'm not sure I understand what you want. Could you please provide an example code snippet to describe what you want ?

Something like

var startDate = date('next monday')

date.setContext({ start : startDate })

var endDate = date('two weeks from start')

oh that'd be pretty easy to do with the context parameter. For right now you could just do:

var startdate = date('next monday');
var enddate = date('two weeks from now', startdate);

I'm down for adding date parsing support for the context argument if it's a string.

oh somehow I missed that from example.

closing, will fix issue in #38