Two questions,
How do I create a unix timestamp from a date variable derived like this:var myDate = $(this).data('date');
the format is like this: 2013-01-01
and how do i then create a new unix timestamp for 90 days later than myDate?
Thanks
Two questions,
How do I create a unix timestamp from a date variable derived like this:var myDate = $(this).data('date');
the format is like this: 2013-01-01
and how do i then create a new unix timestamp for 90 days later than myDate?
Thanks
Ok, don't know it if it's the practise but here's how I solved it:
var myDate = $(this).data('date');
var unixtimestart = new Date(myDate).getTime();
var enddate = Date.parse(myDate).add(90).days();
var unixtimeend = new Date(enddate).getTime();
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.