mdasberg / grunt-ng-apimock

Grunt plugin that provides the ability to use scenario based api mocking of angular apps
MIT License
5 stars 1 forks source link

As a user i would like to be able to add dynamic dates to my mock. #10

Closed rrijnberk closed 8 years ago

rrijnberk commented 8 years ago

It would be nice if we could add a flexible date. Preferably something which can be formatted. I was thinking something along the lines of: " date: X d(ays) X m(onths) X y(ears) in the [ future | past ](as [ json | dd-MM-yyyy ]) "

so "date: 1 day in the future as json" means tomorrow represented as "2015-11-24T00:00:00.000Z" if today is November 23rd 2015.

Whereas "date: 1 months 4 days in the past as dd-MM-yyyy" would be represented as "27-02-2015" if today is March 3rd 2015.

mdasberg commented 8 years ago

@rrijnberk see: https://github.com/mdasberg/grunt-ng-apimock#howto-use-global-variables