Questions tagged [datejs]

Datejs is an open-source JavaScript library for working with dates.

Datejs is an open-source JavaScript library for working with dates. The current version is maintained in the fork "DateJS: Evolved".

The original project site was at datejs.com, but is not currently active.

162 questions
35
votes
7 answers

Work with a time span in Javascript

Using Date.js already, but can also use another library if necessary. Not sure what is the best way to work with time deltas. Specifically, I want to display the time that has elapsed between now and a past date-time. So I need to do something like…
Chris Dutrow
  • 48,402
  • 65
  • 188
  • 258
30
votes
5 answers

Get utc offset from timezone in Javascript

I need a Javascript function that given a timezone, returns the current UTC offset. For example, theFuncIneed('US/Eastern') -> 240
user3124032
  • 409
  • 1
  • 4
  • 4
22
votes
6 answers

Parse 'Date & Time' string in Javascript which are of custom format

I have to parse a date and time string of format "2015-01-16 22:15:00". I want to parse this into JavaScript Date Object. Any help on this? I tried some jquery plugins, moment.js, date.js, xdate.js. Still no luck.
yuva
  • 3,108
  • 4
  • 20
  • 35
15
votes
3 answers

Add 30 days to a Current date - JS

I want to add 30 days to current date and get in a format. Im confused to add a 30 to a date and get new. Its pure JS Solution needed. Format : June 10, 2017
Sarath
  • 207
  • 1
  • 2
  • 7
10
votes
3 answers

Comparing two dates with javascript or datejs (date difference)

I am trying to compare two dates which are in Finnish time form like this: dd.mm.YYYY or d.m.YYYY or dd.m.YYYY or d.mm.YYYY. I am having a hard time finding out how to do this, my current code won't work.