Giter Site home page Giter Site logo

theproductguy / cutetime Goto Github PK

View Code? Open in Web Editor NEW
60.0 4.0 13.0 208 KB

CuteTime is a customizable jQuery plugin that automatically converts timestamps to formats much cuter. Also has the ability to dynamically re-update and/or automatically update timestamps on a controlled interval.

Home Page: http://tpgblog.com

JavaScript 100.00%

cutetime's People

Contributors

theproductguy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

cutetime's Issues

101 years per century?

Why every century has 101 years in CuteTime?

$.cuteTime('2011-06-28');
"just now"

$.cuteTime('1911-06-28');
"101 years ago"

$.cuteTime('1811-06-28');
"202 years ago"

$.cuteTime('1711-06-28');
"304 years ago"

$.cuteTime('1611-06-28');
"405 years ago"

$.cuteTime('1511-06-28');
"507 years ago"

$.cuteTime('1011-06-28');
"1014 years ago"

$.cuteTime('0001-06-28');
"2039 years ago"

PHP ISO8601 date format

Hi,

There's a small problem with dates with ISO8601 format from PHP. When date is formatted with DATE_ISO8601 format, CuteTime's regexp can't recognize it. That's because:

date(DATE_ISO8601) => "Y-m-d\TH:i:sO" => eg. "2004-02-12T15:19:21+0000" - notice lack of ":" in timezone.

source: http://php.net/manual/en/function.date.php

ps. date('u') is working fine, but it's PHP5+ only.

Trim the text before any computation

I like this plugin. We use this in my web application: http://o.pckg.in/deals-crawler. But the plugin just doesn't work if the text contains any extra whitespace. In HTML it is always possible to have some extra text between the elements. You should modify the plugin to execute $.trim() before doing any regex matching.

-Thanks
Sankar.

very localiced 1970-error

Hi

we are using cutetime in our webproduct and I have a quite strange error.
We are all mostly using Chromium on Ubuntu Machines for development and just on my computer there is a problem where the displayed time is always 1.Jan 1970 (so probably timestamp '0')

This happens with my local development server, our test server and even in production. But NOT when I use another browser.

So it's save to say that it's a local Chromium thing

I'm not using any proxies (anymore), I turned off all extensions, looked through all preferences (twice) and updated my system. 'date' in cl gives me a sensible output. I don't see a JavaScript error in Chromiums console

Short: I'm lost.

This is not a big issue (to me) since it doesn't happen to ANYBODY else and I don't expect you to take me by the hand. But have you ever experienced or heard about this? Any ideas?

Changeable TS_ATTR?

Could you please move TS_ATTR attribute to settings?

"data-" attributes are not xhtml friendly and I'd like to change "data-timestamp" to something else (title or property/content in xhtml+rdf) so it would validate.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.