Comments (3)
Currently the script only supports Zulu time
Not true.
It would be nice if other time-zones would also be supported
They are. Try 2018-01-29T21:54:34-07:00
such as per the ISO 8601 specifications
Granted, this parser isn't complete, but there's little benefit to expanding it much more.
Are you just asking for the special military time time zone designator characters?
from jquery-timeago.
Hi Ryan, thank you for your quick reply.
You are correct, I was able to get the ISO 8601 spec to work eventually. and yes I am referring to military time.
In your example you are using <time class="timeago" datetime="2011-12-17T09:24:17Z">December 17, 2011</time>
. I am assuming Z stands for Zulu. Looking at the link, I needed Romeo time, and tried <time class="timeago" datetime="2011-12-17T09:24:17R">December 17, 2011</time>
which no longer works.
I was able to get it to work using
<time class="timeago" datetime="2011-12-17T09:24:17-5:00">December 17, 2011</time>
from jquery-timeago.
Cool. 😎
Yes, the Z
stands for Zulu, but the only reason this library parses it (and not the other military designators, which are quite rare, btw) is because that particular time zone designator (`Z') is special in that many languages will use this short-cut syntax when outputting ISO8601 timestamps in UTC.
For example, in Ruby:
>> Time.now.iso8601
=> "2018-01-30T08:00:27-07:00"
>> Time.now.utc.iso8601
=> "2018-01-30T15:00:31Z"
from jquery-timeago.
Related Issues (20)
- Typescript and no jquery HOT 1
- Can't implement TimeAgo from DateTime inserted into DB
- How do you implement the cutoff feature? HOT 6
- Hindi locale HOT 1
- Refusing to work on anything except Chrome HOT 3
- $.timeago.settings.cutoff Ajax after notworking
- Uncaught TypeError: Cannot read property 'replace' of undefined
- substitute function does not work for numbers > 9 HOT 1
- jQuery.timeago is undefined when setting cutoff HOT 2
- title on abbr tag shows time, only date on time tag HOT 2
- jQuery.timeago is undefined jQuery 3.4.0 HOT 9
- Timeago shows 2 hours ago eventhough the time is sooner HOT 3
- Add setting to pass options for date.toLocaleString()
- not work for weeks, months and years HOT 1
- How to deal with the time zone difference HOT 6
- JQuery Deprecated Methods HOT 1
- NaN variable appear after pasing variable to timeago
- How can I add translation for months' names? HOT 6
- add time ago on google map info windows
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jquery-timeago.