CuteTime

jquery-logo-256 02_facebook-cutetime Many online social products, and more continue to, avoid a formal timestamp format…

2009-10-10 23:14:17 and Thu, October 29, 2004 12:14:19 PM

… opting for more user friendly, “warm and fuzzy,” human-readable styles…

9 days ago and 5 years ago.

As a result, and also in my quest to always help provide my clients free, cheap and easy to use tools, I have been on the lookout for a jQuery plugin that would provide the ability to easily…01_digg-cutetime

  • convert timestamps to ‘cuter’ language-styled forms (e.g. yesterday, 2 hours ago, last year, in the future!),
  • customize the time scales and output formatting, and
  • update automatically and/or manually the displayed CuteTime(s).

While there are other similar tools out there in JavaScript, PHP, and, I am sure, many other languages, none adequately met my goals. Therefore, I created the jQuery CuteTime plugin.

Usage

CuteTime is a customizable jQuery plugin (jQuery.cuteTime) that automatically converts timestamps to formats much cuter. It also has the ability to manually and/or automatically update timestamps on a controlled interval.

  • If used via Selector, CuteTime replaces the text of the provided object with a cuteTime.
  • If used as a function, CuteTime returns a string containing a cuteTime version of the provided timestamp.
// METHOD
$('.timestamp').cuteTime();
$('.timestamp').cuteTime({ /* OPTIONS * / });

cutetime_object = $('.timestamp').cuteTime();
cutetime_object.update_cuteness();

// FUNCTION
$.cuteTime('2009/10/12 22:11:19');
$.cuteTime({ /* OPTIONS * / }, '2009-11-24T19:20:30+01:00');

As a Function

If used as a function, CuteTime returns a string containing a cuteTime version of the provided timestamp.

$(document).ready(function () {
	// timestamp MUST be a valid Date().parse 'able' format
	$('.predetermined').text(
		$.cuteTime('2009/10/12 22:11:19')
	);
	$('.predetermined2').text(
		$.cuteTime(settings, '2009-11-24T13:15:30Z')
	);
});
<html>
	<body>
		<div class='predetermined'></div>
		<div class='predetermined2'></div>
	</body>
</html>


As a Method

If used via Selector, CuteTime replaces the text of the provided object with a cuteTime.

$(document).ready(function () {
	$('.timestamp').cuteTime();
});
<html>
	<body>
		<div class="timestamp">
			2009/10/12 22:11:19
		</div>
		<div class="timestamp">
			2008/11/01 07:11:00
		</div>
		<div class="timestamp">
			2018/11/01 07:11:00
		</div>
		<div class="timestamp"></div>
		<div class="timestamp" cutetime="1980/10/12 22:11:19">
			2009/10/12 22:11:19
		</div>
		<div class="timestamp" cutetime="asd">
			10/12/2009 22:11:19
		</div>
		<div class="timestamp" cutetime="asd">
			aoisd
		</div>
		<div class="timestamp" cutetime="asd"></div>
	</body>
</html>

When initialized, the cuteTime() call either updates or assigns the ‘cutetime’ attribute to the provided objects. Method implementation supports chaining, returning the jQuery object.

e.g. <div class=’timestamp’ cutetime=’2009 10 12 22:11:19′>2009 10 12 22:11:19</div>

If the cutetime attribute already exists within the provided object, then the text within the object is ignored in the cutification process. If the cutetime attribute does not exist or an invalid one is provided, then a valid cutetime attribute is assigned to the object.

If the cutetime attribute is missing, then it is calculated from the text of the provided object.

If neither cutetime attribute nor valid object text exist, then the timestamp is assumed to be ‘now’.

When using CuteTime in the form…

&lt;br /&gt;
$(document).ready(function () {
	remember_the_cuteness = $('.timestamp').cuteTime();
});

… the following methods can be used …

// stops all automatic updates of refresh-enabled timestamps
remember_the_cuteness.stop_cuteness();

// (re)starts the automatic updating of timestamps
// REMINDER: make sure refresh is set to &gt; 0
remember_the_cuteness.start_cuteness();

// updates timestamps of the provided objects
remember_the_cuteness.update_cuteness();

Settings

By default, automatic updating is disabled and the following CuteTimes can be displayed…

the future!
just now
a few seconds ago
a minute ago
x minutes ago
an hour ago
x hours ago
yesterday
x days ago
last month
x months ago
last year
x years ago

To change these settings, they can either be accessed directly…

$.fn.cuteTime.settings.refresh = 10000;

… or at the time of initialization …

my_cutetime = $('.timestamp_move').cuteTime({ refresh: 60000*10 });

The default settings data structure is…

$.fn.cuteTime.settings = {
	refresh: -1,			// time in milliseconds before next refresh of page data; -1 == no refresh
	time_ranges: [
		{bound: Number.NEGATIVE_INFINITY,	// IMPORANT: bounds MUST be in ascending order, from negative infinity to positive infinity
			cuteness: 'the future!',			unit_size: 0},
		{bound: 0,
			cuteness: 'just now',				unit_size: 0},
		{bound: 20 * 1000,
			cuteness: 'a few seconds ago',		unit_size: 0},
		{bound: 60 * 1000,
			cuteness: 'a minute ago',			unit_size: 0},
		{bound: 60 * 1000 * 2,
			cuteness: ' minutes ago',			unit_size: 60 * 1000},
		{bound: 60 * 1000 * 60,
			cuteness: 'an hour ago',			unit_size: 0},
		{bound: 60 * 1000 * 60 * 2,
			cuteness: ' hours ago',				unit_size: 60 * 1000 * 60},
		{bound: 60 * 1000 * 60 * 24,
			cuteness: 'yesterday',				unit_size: 0},
		{bound: 60 * 1000 * 60 * 24 * 2,
			cuteness: ' days ago',				unit_size: 60 * 1000 * 60 * 24},
		{bound: 60 * 1000 * 60 * 24 * 30,
			cuteness: 'last month',				unit_size: 0},
		{bound: 60 * 1000 * 60 * 24 * 30 * 2,
			cuteness: ' months ago',			unit_size: 60 * 1000 * 60 * 24 * 30},
		{bound: 60 * 1000 * 60 * 24 * 30 * 12,
			cuteness: 'last year',				unit_size: 0},
		{bound: 60 * 1000 * 60 * 24 * 30 * 12 * 2,
			cuteness: ' years ago',				unit_size: 60 * 1000 * 60 * 24 * 30 * 12},
		{bound: Number.POSITIVE_INFINITY,
			cuteness: 'a blinkle ago',			unit_size: 0}
	]
};

All modifications to the settings are non-constructive.  This means that you need to specify all the non-default settings you wish to have applied on each cuteTime.update_cuteness() or cuteTime() call.

The parameters are defined (and all can be overridden) thus…

  • refresh
    • time in milliseconds before next refresh of page data;
    • a value of -1 disables refreshing
  • time_ranges
    • the array of bound_structures that delineate the cute descriptions associated with time_ranges
    • time_range’s boundary structures consist of the following variables…
  • time_range[x].bound
    • the value is an integer representing the time difference between the provided timestamp and now
    • the lower inclusive bound, or starting point, for using the ‘cuteness’ string that describes the current timestamp
    • the exclusive upper bound is defined by the next boundary structure definition in the time_ranges array [current boundary + 1]
  • time_range[x].cuteness
    • string to use in place of the current timestamp (e.g. ‘yesterday’)
  • time_range[x].unit_size
    • the integer divisor in milliseconds to apply to the calculated time difference
    • if unit_size > 0 then a number value is prepended to the cuteness string as calculated by time_difference / unit_size (e.g. 4 hours ago)
    • if unit_size = 0, then no number is prepended to the cuteness string (e.g. an hour ago)

%CT% and International Support

Originally, CuteTime was developed with a less than universal syntactic centricity.  Basically, CuteTime originally could hanle the cuteness of presenting…

“a few seconds ago”
“last month”

…as well as prepend values resulting in…

” hours ago” becoming “4 hours ago”
” seconds ago” becoming “18 seconds ago”.

Now, in addition to supporting the prepending of the computed CuteTime,

  • the calculation can be inserted within the cuteness string, and
  • both formatted HTML styling and proper character accenting can be applied…

…resulting in the additional support for…

“il y a %CT% minutes” becoming “il y a 4 minutes”
“l\’ann&eacute;e derni&egrave;re” becoming “l’année dernière”
“<span style=’color: red; font-weight: bold’>in the future<span>” becoming in the future

Date & Time

Formatting of timestamps is the bane of many a developer.  Especially onerous is the handling of “standard” time formatting by the front-end developer.  The JavaScript Date Object() supports the IETF standard, defined in RFC 822 Section 5, at least in FireFox, with most backend systems providing and storing (or at least converting to) dates in ISO8601 form.

Now, when converting a normal time into a CuteTime it can be either formatted in a manner compatible with the JavaScript Date() Object …

Thu Oct 15 2009 22:11:19 GMT-0400 (Eastern Daylight Time)
Oct 15 2009 22:11:19

… or ISO8601 …

2009-11-24T19:20:30+01:00
2009-11
2009-11-24T13:15:30Z

If you are counting on leveraging the JavaScript Date() Object handling of your timestamp, make sure you use timestamps that are fully recognized by the JavaScript Date object’s Parse method in all the browser versions you want to support. Otherwise, prepare for a headache.  😉

Get It

You can download CuteTime, dual licensed under GPL and MIT, from…

jQuery Repository
http://plugins.jquery.com/project/CuteTime

Git
Public Clone URL: git://github.com/theproductguy/CuteTime.git
GitHub: http://github.com/theproductguy/CuteTime

Zip
jQuery.cuteTime-source-bundle_1.1.3_20100406.zip

Demo

http://theproductguy.com/cutetime/cutetime.demo.html

Release Notes

Version 1.0 – 2009/10/17
Initial Release.

Version 1.0.5 – 2009/11/10
[UPDATED] updated cutetime attribute to be HTML 5 custom attribute compatible and more flexible in the future; using data-timestamp and global constant TS_ATTR
[UPDATED] test/demo HTML files to work with new TS_ATTR
[UPDATE] minified version of javascript compiled with Google’s Closure Tools (new)
[FIXED] setting behavior is not as desired THEREFORE updated settings (temporarily) to be DESTRUCTIVE between updates
[FEATURE] added translations.txt to act as repository for all language translations for the CuteTime  cuteness translations

Version 1.0.6 – 2009.11.19
[FEATURE] added Spansish time translation to the translations.txt file (courtesy of Alex Hernandez)

Version 1.1 – 2009.11.26
[FEATURE] implemented case-sensitive variable %CT% that can be used anywhere within the cuteness strings; if not specified, and number insertion is called for, then prepends number to provided string; if no number is called for, then the %CT% is removed from the final string
[FEATURE] added support for foreign language characters and HTML within the cuteness strings
[FEATURE] accepts timestamps in format compatible with either/both JavaScript Date() Object as well as ISO8601
[UPDATED] test/demo files to also demo foreign language and %CT%
[UPDATED] test/demo files to also demo ISO8601
[FEATURE] settings can be submitted as parameter to CuteTime function call
[FEATURE] added French time translation to the translations.txt file (courtesy of Bruno Morency)
[FIXED] documentation to indicate that Number.NEGATIVE_INFINITY and Number.POSTIVE_INFINITY should be used within the bounds

Version 1.1.1 – 2010.02.01
[FEATURE] added Russian time translation to the translations.txt file (courtesy of Jansen Price)

Version 1.1.2 – 2010.02.03
[FEATURE] added Portuguese time translation to the translations.txt file (courtesy of Carlos Moutinho)

Version 1.1.3 – 2010.04.06
[FIXED] bug whereby non-negative UTC offsets were appearing in ‘the future!’ (thanks to Sébastien Roger)

If you find this useful, or have any questions, ideas, or issues, leave a comment.

Enjoy!

Jeremy Horn
The Product Guy

<!–[if !mso]> <! st1\:*{behavior:url(#ieooui) } –>

$(document).ready(function () {

// timestamp MUST be a valid Date().parse ‘able’ format

$.cuteTime(‘2009/10/12 22:11:19’);

});

81 comments

    1. A little change to time zone calculation (it was doing opposite way around)

      if (!isEmpty(iso_date[16])) {
      var sign = 1;
      if (iso_date[16] == ‘-‘) sign = -1;
      TZ_hour_offset *= sign;
      TZ_minute_offset *= sign;
      }

      Like

  1. I have one initial comment about this plugin, and its the usage of the custom element attribute “cutetime”. This attribute is invalid HTML, and without a custom DTD its also invalid XHTML. To be HTML5 valid you would have to use a data-attribute, such as “data-cutetime”.

    What is it you want to do with the orginal timestamp, since you expose it as a element attrbute? You could use jQuery.data to store the orginal timestamp in the internal jQuery data-object. It would be way faster, because you minimize the DOM-access. But this way the timestamp would not be exposed in the DOM, and therefore not accessible from ouside of the jQuery context.

    If you do want to expose the orginal timestamp into the DOM, and therefore into the semantics of the markup, then I think you should consider using the HTML5 data-attributes, and in that case I would rename the attribute to “date” or “timestamp”, since its information that describes the date-context in a generic way.

    Just my cents..

    -Kenneth Auchenberg

    Like

  2. Thanks to Vincent Rolfs we have an example of how to use CuteTime in a multilingual setting. Vincent’s German example follows…

    $(‘.timestamp’).cuteTime({
    time_ranges: [
    {bound: NEG_INF,
    cuteness: ‘in der Zukunft!’, unit_size: 0},
    {bound: 0,
    cuteness: ‘gerade jetzt’, unit_size: 0},
    {bound: 20 * 1000,
    cuteness: ‘vor ein paar Sekunden’, unit_size: 0},
    {bound: 60 * 1000,
    cuteness: ‘vor einer Minute’, unit_size: 0},
    {bound: 60 * 1000 * 2,
    cuteness: ‘ Minuten her’, unit_size: 60 * 1000},
    {bound: 60 * 1000 * 60,
    cuteness: ‘vor einer Stunde’, unit_size: 0},
    {bound: 60 * 1000 * 60 * 2,
    cuteness: ‘ Stunden her’, unit_size: 60 * 1000 * 60},
    {bound: 60 * 1000 * 60 * 24,
    cuteness: ‘Gestern’, unit_size: 0},
    {bound: 60 * 1000 * 60 * 24 * 2,
    cuteness: ‘ Tage her’, unit_size: 60 * 1000 * 60 * 24},
    {bound: 60 * 1000 * 60 * 24 * 30,
    cuteness: ‘letzen Monat’, unit_size: 0},
    {bound: 60 * 1000 * 60 * 24 * 30 * 2,
    cuteness: ‘ Monate her’, unit_size: 60 * 1000 * 60 * 24 * 30},
    {bound: 60 * 1000 * 60 * 24 * 30 * 12,
    cuteness: ‘letztes Jahr’, unit_size: 0},
    {bound: 60 * 1000 * 60 * 24 * 30 * 12 * 2,
    cuteness: ‘ Jahre her’, unit_size: 60 * 1000 * 60 * 24 * 30 * 12},
    {bound: POS_INF,
    cuteness: ‘vor langer Zeit’, unit_size: 0}
    ]
    });

    Like

  3. Hey, nice work, this my translation to Spanish .

    thanks.

    SETTINGS = {
    time_ranges: [
    {bound: NEG_INF,
    cuteness: ‘el futuro!’, unit_size: 0},
    {bound: 0,
    cuteness: ‘en este momento’, unit_size: 0},
    {bound: 20 * 1000,
    cuteness: ‘hace unos segundos’, unit_size: 0},
    {bound: 60 * 1000,
    cuteness: ‘hace un minuto’, unit_size: 0},
    {bound: 60 * 1000 * 2,
    cuteness: ‘ minutos, unit_size: 60 * 1000},
    {bound: 60 * 1000 * 60,
    cuteness: ‘hace una hora atrás’, unit_size: 0},
    {bound: 60 * 1000 * 60 * 2,
    cuteness: ‘ horas’, unit_size: 60 * 1000 * 60},
    {bound: 60 * 1000 * 60 * 24,
    cuteness: ‘ayer’, unit_size: 0},
    {bound: 60 * 1000 * 60 * 24 * 2,
    cuteness: ‘ días’, unit_size: 60 * 1000 * 60 * 24},
    {bound: 60 * 1000 * 60 * 24 * 30,
    cuteness: ‘en el último mes’, unit_size: 0},
    {bound: 60 * 1000 * 60 * 24 * 30 * 2,
    cuteness: ‘ meses atrás’, unit_size: 60 * 1000 * 60 * 24 * 30},
    {bound: 60 * 1000 * 60 * 24 * 30 * 12,
    cuteness: ‘el año pasado’, unit_size: 0},
    {bound: 60 * 1000 * 60 * 24 * 30 * 12 * 2,
    cuteness: ‘ años’, unit_size: 60 * 1000 * 60 * 24 * 30 * 12},
    {bound: POS_INF,
    cuteness: ‘hace rato’, unit_size: 0}
    ]
    };

    Like

        1. One such OK workaround can be to reformat the string to be JavaScript Date() compatible when passing the value to the client-side.

          HOWEVER, I am, right now, working on a better solution. The next major release (v1.1) will support both JavaScript Date() and ISO 8601 compatible timestamp formats.

          Like

  4. Hi, thanks for this great plugin!

    I started a translation in french, but there is a little difficulty :

    X hours ago => il y a X heures

    There is a way to place the X inside the sentence ?

    Like

  5. Hi again, I finally find a way

    this is my french traduction :

    {bound: NEG_INF, // IMPORANT: bounds MUST be in ascending order, from negative infinity to positive infinity
    cuteness: ‘le future!’, unit_size: 0},
    {bound: 0,
    cuteness: “a l’instant”, unit_size: 0},
    {bound: 20 * 1000,
    cuteness: ‘il y a quelques secondes’, unit_size: 0},
    {bound: 60 * 1000,
    cuteness: ‘il y a 1 minute’, unit_size: 0},
    {bound: 60 * 1000 * 2,
    cuteness: ‘il y a X minutes’, unit_size: 60 * 1000},
    {bound: 60 * 1000 * 60,
    cuteness: ‘il y a 1 heure’, unit_size: 0},
    {bound: 60 * 1000 * 60 * 2,
    cuteness: ‘il y a X heures’, unit_size: 60 * 1000 * 60},
    {bound: 60 * 1000 * 60 * 24,
    cuteness: ‘hier’, unit_size: 0},
    {bound: 60 * 1000 * 60 * 24 * 2,
    cuteness: ‘il y a X jours’, unit_size: 60 * 1000 * 60 * 24},
    {bound: 60 * 1000 * 60 * 24 * 30,
    cuteness: ‘il y a 1 mois’, unit_size: 0},
    {bound: 60 * 1000 * 60 * 24 * 30 * 2,
    cuteness: ‘il y a X mois’, unit_size: 60 * 1000 * 60 * 24 * 30},
    {bound: 60 * 1000 * 60 * 24 * 30 * 12,
    cuteness: “il y a 1 an”, unit_size: 0},
    {bound: 60 * 1000 * 60 * 24 * 30 * 12 * 2,
    cuteness: ‘il y a X ans’, unit_size: 60 * 1000 * 60 * 24 * 30 * 12},
    {bound: POS_INF,
    cuteness: ‘a blinkle ago’, unit_size: 0}

    then, replace :
    cute_time = calculated_time + timespan[‘cuteness’];
    by :
    var reg=new RegExp(“(X)”, “g”);
    cute_time = timespan[‘cuteness’].replace(reg,calculated_time);

    Like

  6. hi, this is great! i want to use this for events, so would need it to output future dates. ie: this event is in 3 days 7h 12m 23sec

    is this a possible feature to tweak into this great plugin?

    thanks!

    Like

    1. Sam – You sure can define future cutetime language and time ranges. You can define the ranges to be in the past or the future via the settings as desired. However, the plugin will only display 1 unit of granularity. In your example you could say something is going to happen “in about 3 days” or “in 72 hours”.

      Like

  7. CuteTime is great!! xD, but… I’m making a website and i’m using DatePicker and i saw that when i had using CuteTime this wasn’t working and same with DatePicker..

    Only works the wich was declared first.

    Somebody can help me with a crack or some settings thanks.

    Like

  8. Hi,

    Looks like a great plugin, we would just like to suggest one update to your above settings code. Shouldnt the last bound be positive infinity? Currently you have both first and last bound as “Number.NEGATIVE_INFINITY” 🙂

    Like

  9. Hi. Thank you for a great plugin.
    Here’s my translation to Portuguese (Portugal)

    var portuguese = {
    time_ranges: [
    {bound: Number.NEGATIVE_INFINITY,
    cuteness: ‘o futuro!’, unit_size: 0},
    {bound: 0,
    cuteness: ‘agora mesmo’, unit_size: 0},
    {bound: 20 * 1000,
    cuteness: ‘há uns segundos’, unit_size: 0},
    {bound: 60 * 1000,
    cuteness: ‘há um minuto’, unit_size: 0},
    {bound: 60 * 1000 * 2,
    cuteness: ‘há %CT% minutos’, unit_size: 60 * 1000},
    {bound: 60 * 1000 * 60,
    cuteness: ‘acerca de há uma hora atrás’, unit_size: 0},
    {bound: 60 * 1000 * 60 * 2,
    cuteness: ‘há %CT% horas atrás’, unit_size: 60 * 1000 * 60},
    {bound: 60 * 1000 * 60 * 24,
    cuteness: ‘ontem’, unit_size: 0},
    {bound: 60 * 1000 * 60 * 24 * 2,
    cuteness: ‘há %CT% dias’, unit_size: 60 * 1000 * 60 * 24},
    {bound: 60 * 1000 * 60 * 24 * 30,
    cuteness: ‘no mês passado’, unit_size: 0},
    {bound: 60 * 1000 * 60 * 24 * 30 * 2,
    cuteness: ‘há %CT% meses atrás’, unit_size: 60 * 1000 * 60 * 24 * 30},
    {bound: 60 * 1000 * 60 * 24 * 30 * 12,
    cuteness: ‘no ano passado’, unit_size: 0},
    {bound: 60 * 1000 * 60 * 24 * 30 * 12 * 2,
    cuteness: ‘há %CT% anos’, unit_size: 60 * 1000 * 60 * 24 * 30 * 12},
    {bound: Number.POSITIVE_INFINITY,
    cuteness: ‘há bué tempo’, unit_size: 0}
    ]
    };

    Like

  10. Thank you for this interesting plugin.

    But there seems to be a problem with calculation of spans greater than 24 hours.

    Let’s say it is 2010-01-03 12:00:00 for example and I want to get the cute time for 2010-01-01 18:00:00 it will return “yesterday” – that is not correct.

    Tested this with IE8 and FF 3.6

    Like

    1. Thank you. The calculation is correct. In my examples I have defined yesterday to be between 24 and 48 hours ago — you example falls right within that window. The great thing about CuteTime is that it allows for the customization of times, units and timespans to suit your needs. Thereby allowing you to remove the “yesterday” label or even redefine it. Hope this helps clarify.

      Like

  11. Is there any chance you could extend this plugin to take MySQL date formats? Namely, ‘YYYY-MM-DD G:m:s’ where G is the 24 hour time.

    Like

    1. No current plans for supporting more than JavaScript and the ISO 8601 standard. But, I am open to greater support if demand emerges for other standards; but it appears that web dev is zeroing in on JavaScript Date() and ISO 8601.

      If you are using PHP, you can easily make your timestamps compliant by…
      $timestamp8601 = date(‘c’, strtotime($timestamp));

      Or, if you want to do it via MySQL you can go with the built-in Date and Time functions…
      http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html#function_get-format

      Hope that helps.

      Like

    1. I have had a chance to walk through your code. It appears that the Date() object and methods are unique to Safari (different than IE, FireFox, Chrome). When you are not using an ISO8601 compliant timestamp, the CuteTime plugin uses the browser’s built in methods associated with the Date() object. As I caution in the documentation when not using ISO8601 timestamps: “If you are counting on leveraging the JavaScript Date() Object handling of your timestamp, make sure you use timestamps that are fully recognized by the JavaScript Date object’s Parse method in all the browser versions you want to support. Otherwise, prepare for a headache. ;-)”

      I did also test your code in all browsers and everything appears to work fine. To most easily handle Safari (including all browsers) I recommend you use ISO8601 formatted timestamps. That should solve the issue you are experiencing.

      I hope this helps & good luck.

      Like

  12. Hi Jeremy,

    I have a problem with futur date.
    In my setting
    {bound: -60 * 1000 * 60 * 24, cuteness: ‘in %CT% hours’, unit_size: 60 * 1000 * 60}

    The result is “in -4 hours”. How set positive unit ?

    Thanks for this plugin !

    Like

      1. var cute_settings= {
        time_ranges: [
        {bound: -60 * 1000 * 60 * 24 * 30 * 12 * 2,
        cuteness: ‘in %CT% years’, unit_size: 60 * 1000 * 60 * 24 * 30 * 12},

        {bound: -60 * 1000 * 60 * 24 * 30 * 12,
        cuteness: ‘in %CT% month’, unit_size: 60 * 1000 * 60 * 24 * 30},

        {bound: -60 * 1000 * 60 * 24 * 30,
        cuteness: ‘in %CT% days’, unit_size: 60 * 1000 * 60 * 24},

        {bound: -60 * 1000 * 60 * 48,
        cuteness: ‘in %CT% hours’, unit_size: 60 * 1000 * 60},

        {bound: -60 * 1000 * 60,
        cuteness: ‘in %CT% minutes’, unit_size: 60 * 1000},

        {bound: -60 * 1000,
        cuteness: ‘in %CT% secondes’, unit_size: 1000},

        {bound: 0,
        cuteness: ‘just now’, unit_size: 0},
        {bound: 20 * 1000,
        cuteness: ‘a few seconds ago’, unit_size: 0},
        {bound: 60 * 1000,
        cuteness: ‘a minute ago’, unit_size: 0},
        {bound: 60 * 1000 * 2,
        cuteness: ‘ minutes ago’, unit_size: 60 * 1000},
        {bound: 60 * 1000 * 60,
        cuteness: ‘an hour ago’, unit_size: 0},
        {bound: 60 * 1000 * 60 * 2,
        cuteness: ‘ hours ago’, unit_size: 60 * 1000 * 60},
        {bound: 60 * 1000 * 60 * 24,
        cuteness: ‘yesterday’, unit_size: 0},
        {bound: 60 * 1000 * 60 * 24 * 2,
        cuteness: ‘ days ago’, unit_size: 60 * 1000 * 60 * 24},
        {bound: 60 * 1000 * 60 * 24 * 30,
        cuteness: ‘last month’, unit_size: 0},
        {bound: 60 * 1000 * 60 * 24 * 30 * 2,
        cuteness: ‘ months ago’, unit_size: 60 * 1000 * 60 * 24 * 30},
        {bound: 60 * 1000 * 60 * 24 * 30 * 12,
        cuteness: ‘last year’, unit_size: 0},
        {bound: 60 * 1000 * 60 * 24 * 30 * 12 * 2,
        cuteness: ‘ years ago’, unit_size: 60 * 1000 * 60 * 24 * 30 * 12},
        {bound: POS_INF,
        cuteness: ‘a blinkle ago’, unit_size: 0}
        ],
        refresh: 1000
        };

        Like

        1. sorry, error in copy/paste

          replace
          {bound: POS_INF,
          cuteness: ‘a blinkle ago’, unit_size: 0}
          by
          {bound: Number.POSITIVE_INFINITY,
          cuteness: ‘a blinkle ago’, unit_size: 0}

          Like

  13. Hi,

    gotta say that it’s a great plugin! Although 1 thing that annoys me is that you save the objects and then update them only. The problem comes if someone uses AJAX to display additional content, even if the class is the same those timestamps won’t be updated. If i use $(‘.timestamp’).cuteTime() again, it will update only the newly created ones, so I had to hack my app to make additional fields so i first copy all the values into all my spans, then call cuteTime.

    Like

    1. Yep… that is a known shortcoming. I am going to make sure to put the feature on my queue of features for the next major release.

      In the meantime, a workaround can be to – When you add a new row to stop the current CuteTime and re-call $(…).cuteTime().

      Like

      1. I had the same problem, I try to solve it in the ajax call by:
        // ajax.load
        function() {
        var timeObject = $(‘.timestamp’).cuteTime();
        timeObject.stop_cuteness();
        timeObject.start_cuteness();

        but got:
        TypeError: timeObject.stop_cuteness is not a function

        Like

  14. From the perspective of Castilian spanish (es_ES) spoken in Spain this would be a more proper spanish translation…

    times : {
    time_ranges: [
    {bound: Number.NEGATIVE_INFINITY, cuteness: ‘¡En el futuro!’, unit_size: 0},
    {bound: 0, cuteness: ‘ahora mismo’, unit_size: 0},
    {bound: 20 * 1000, cuteness: ‘hace unos segundos’, unit_size: 0},
    {bound: 60 * 1000, cuteness: ‘hace un minuto’, unit_size: 0},
    {bound: 60 * 1000 * 2, cuteness: ‘hace %CT% minutos’, unit_size: 60 * 1000},
    {bound: 60 * 1000 * 60, cuteness: ‘hace una hora’, unit_size: 0},
    {bound: 60 * 1000 * 60 * 2, cuteness: ‘hace %CT% horas’, unit_size: 60 * 1000 * 60},
    {bound: 60 * 1000 * 60 * 24, cuteness: ‘ayer’, unit_size: 0},
    {bound: 60 * 1000 * 60 * 24 * 2, cuteness: ‘hace %CT% días’, unit_size: 60 * 1000 * 60 * 24},
    {bound: 60 * 1000 * 60 * 24 * 30, cuteness: ‘el mes pasado’, unit_size: 0},
    {bound: 60 * 1000 * 60 * 24 * 30 * 2, cuteness: ‘hace %CT% meses’, unit_size: 60 * 1000 * 60 * 24 * 30},
    {bound: 60 * 1000 * 60 * 24 * 30 * 12, cuteness: ‘el año pasado’, unit_size: 0},
    {bound: 60 * 1000 * 60 * 24 * 30 * 12 * 2, cuteness: ‘hace %CT% años’, unit_size: 60 * 1000 * 60 * 24 * 30 * 12},
    {bound: Number.POSITIVE_INFINITY, cuteness: ‘algún día en el futuro’, unit_size: 0}
    ]
    }

    Like

    1. @Raul: I’m sorry to correct you at value POSITIVE_INFINITY “a blinkle ago” means “a long long time ago”. Translation would be “hace mucho tiempo”.

      Your translation reads “algún día en el futuro” meaning “someday at the future”.

      Like

  15. Can someone modify the code to show 1 day, 4 hours ago, for example, instead of just 1 day ago?

    { bound: 0, cuteness: “just now”, unit_size: 0 },
    { bound: 20 * 1000, cuteness: “a few seconds ago”, unit_size: 0 },
    { bound: 60 * 1000, cuteness: “one minute ago”, unit_size: 0 },
    { bound: 60 * 1000 * 2, cuteness: ” minutes ago”, unit_size: 60 * 1000 },
    { bound: 60 * 1000 * 60, cuteness: “one hour ago”, unit_size: 0 },
    { bound: 60 * 1000 * 60 * 2, cuteness: ” hours ago”, unit_size: 60 * 1000 * 60 },
    { bound: 60 * 1000 * 60 * 24, cuteness: “1 day ago”, unit_size: 0 },
    { bound: 60 * 1000 * 60 * 24 * 2, cuteness: ” days ago”, unit_size: 60 * 1000 * 60 * 24 },
    { bound: 60 * 1000 * 60 * 24 * 7, cuteness: “1 week ago”, unit_size: 0 },
    { bound: 60 * 1000 * 60 * 24 * 7 * 2, cuteness: ” weeks ago”, unit_size: 60 * 1000 * 60 * 24 * 7 },
    { bound: 60 * 1000 * 60 * 24 * 30, cuteness: “1 month ago”, unit_size: 0 },
    { bound: 60 * 1000 * 60 * 24 * 30 * 2, cuteness: ” months ago”, unit_size: 60 * 1000 * 60 * 24 * 30 },
    { bound: 60 * 1000 * 60 * 24 * 30 * 12, cuteness: “1 year ago”, unit_size: 0 },
    { bound: 60 * 1000 * 60 * 24 * 30 * 12 * 2, cuteness: ” years ago”, unit_size: 60 * 1000 * 60 * 24 * 30 * 12 },
    { bound: d, cuteness: “a blinkle ago”, unit_size: 0}] };

    Like

    1. I think I like where you are going with this. Currently I only support one “rung” at a time. If I were to extend you example to a longer period of time, would the following also fit?

      example 1:
      3 months, 3 days ago

      example 2:
      1 year, 4 months ago

      As well as short time spans:
      a few minutes and a couple of seconds ago

      Or do you have a different set of use cases in mind? If so, please elaborate. Thanks.

      Like

      1. Thanks so much for your reply. Yes, ideally if the time span is less than one minute, it displays seconds. If less than hour, it displays minutes and seconds. Less than one day displays hours and minutes, etc… Thanks so much!

        Like

  16. any thoughts why I’m getting a:

    Uncaught TypeError: Cannot read property ‘time_ranges’ of undefined

    when I $.cuteTime(‘2009/10/12 22:11:19’);

    Thank you

    Like

  17. Thanks for great plugin. i used this with jstl tags working fine. is it possible to display yesterday or some day with time?
    if we see in facebook yesterday 11.00AM , is it possible to display?

    Like

  18. first of all thank you for nice plug in. auto refresh is not working with multiple divs with different class names.i have taken two divs and calling two diff functions

    $(document).ready(function () {
    $(‘.timestamp’).cuteTime({ refresh: 10000 });
    $(‘.xyz’).cuteTime({ refresh: 10000 });
    });

    auto refresh works only for one div. can you help me ?

    Like

  19. This plugin is great but you be careful to not use spaces because cutetime not working if there is spaces on left or right side of date in an html element.
    Example:
    This is not working on firefox : 2011-09-21T14:36:08Z
    This is good : 2011-09-21T14:36:08Z

    Like

  20. i just wanted to use the plugin on a new project of mine (http://www.tankwacht.de – calculates the fuel consumption and costs of your vehicles, currently its only available on german) and found out that the provided german translation isnt really suitable for a professional website as given strings have some wierd touch for a native speaker. Please understand, they are not wrong, but just a little wierd – a german never would say it that way.
    So here is a customized version using the inline replacements for a proper german translation:

    SETTINGS = {
    time_ranges: [
    {bound: Number.NEGATIVE_INFINITY,
    cuteness: ‘in der Zukunft!’, unit_size: 0},
    {bound: 0,
    cuteness: ‘in diesem Augenblick’, unit_size: 0},
    {bound: 20 * 1000,
    cuteness: ‘vor ein paar Sekunden’, unit_size: 0},
    {bound: 60 * 1000,
    cuteness: ‘vor einer Minute’, unit_size: 0},
    {bound: 60 * 1000 * 2,
    cuteness: ‘vor %CT% Minuten’, unit_size: 60 * 1000},
    {bound: 60 * 1000 * 60,
    cuteness: ‘vor einer Stunde’, unit_size: 0},
    {bound: 60 * 1000 * 60 * 2,
    cuteness: ‘vor %CT% Stunden’, unit_size: 60 * 1000 * 60},
    {bound: 60 * 1000 * 60 * 24,
    cuteness: ‘Gestern’, unit_size: 0},
    {bound: 60 * 1000 * 60 * 24 * 2,
    cuteness: ‘vor %CT% Tagen’, unit_size: 60 * 1000 * 60 * 24},
    {bound: 60 * 1000 * 60 * 24 * 30,
    cuteness: ‘last month’, unit_size: 0},
    {bound: 60 * 1000 * 60 * 24 * 30 * 2,
    cuteness: ‘vor %CT% Monaten’, unit_size: 60 * 1000 * 60 * 24 * 30},
    {bound: 60 * 1000 * 60 * 24 * 30 * 12,
    cuteness: ‘letztes Jahr’, unit_size: 0},
    {bound: 60 * 1000 * 60 * 24 * 30 * 12 * 2,
    cuteness: ‘vor %CT% Jahren’, unit_size: 60 * 1000 * 60 * 24 * 30 * 12},
    {bound: Number.POSITIVE_INFINITY,
    cuteness: ‘vor unbestimmter Zeit’, unit_size: 0}
    ]
    };

    Like

  21. Hi! Thanks for a great plugin! I found Russian translation a bit awkward. Here’s a native one:

    SETTINGS = {
    time_ranges: [
    {bound: NEG_INF,
    cuteness: ‘в будущем!’, unit_size: 0},
    {bound: 0,
    cuteness: ‘только что’, unit_size: 0},
    {bound: 20 * 1000,
    cuteness: ‘несколько секунд назад’, unit_size: 0},
    {bound: 60 * 1000,
    cuteness: ‘минуту назад’, unit_size: 0},
    {bound: 60 * 1000 * 2,
    cuteness: ‘минуты назад’, unit_size: 60 * 1000},
    {bound: 60 * 1000 * 5,
    cuteness: ‘минут назад’, unit_size: 60 * 1000},
    {bound: 60 * 1000 * 60,
    cuteness: ‘час назад’, unit_size: 0},
    {bound: 60 * 1000 * 60 * 2,
    cuteness: ‘часа назад’, unit_size: 60 * 1000 * 60},
    {bound: 60 * 1000 * 60 * 5,
    cuteness: ‘часов назад’, unit_size: 60 * 1000 * 60},
    {bound: 60 * 1000 * 60 * 24,
    cuteness: ‘вчера’, unit_size: 0},
    {bound: 60 * 1000 * 60 * 24 * 2,
    cuteness: ‘дня назад’, unit_size: 60 * 1000 * 60 * 24},
    {bound: 60 * 1000 * 60 * 24 * 5,
    cuteness: ‘дней назад’, unit_size: 60 * 1000 * 60 * 24},
    {bound: 60 * 1000 * 60 * 24 * 30,
    cuteness: ‘в прошлом месяце’, unit_size: 0},
    {bound: 60 * 1000 * 60 * 24 * 30 * 2,
    cuteness: ‘месяца назад’, unit_size: 60 * 1000 * 60 * 24 * 30},
    {bound: 60 * 1000 * 60 * 24 * 30 * 5,
    cuteness: ‘месяцев назад’, unit_size: 60 * 1000 * 60 * 24 * 30},
    {bound: 60 * 1000 * 60 * 24 * 30 * 12,
    cuteness: ‘в прошлом году’, unit_size: 0},
    {bound: 60 * 1000 * 60 * 24 * 30 * 12 * 2,
    cuteness: ‘года назад’, unit_size: 60 * 1000 * 60 * 24 * 30 * 12},
    {bound: 60 * 1000 * 60 * 24 * 30 * 12 * 5,
    cuteness: ‘лет назад’, unit_size: 60 * 1000 * 60 * 24 * 30 * 12},
    {bound: POS_INF,
    cuteness: ‘давно’, unit_size: 0}
    ]
    };

    Like

  22. Hi, I encountered a bug with CuteTime on iPad. The time is displayed as “just now” while it displayed correctly (2 days ago, 1 week ago…) on desktop. Has anyone know how to fix it.

    Like

  23. It seems there is a bug in the way milliseconds are handled. I am experiencing this on Chrome, Safari 5.0 and 5.1 and OmniWeb (which is basically the same as Safari 5.0). I haven’t tried other browsers.

    In the browser console at 9:43am I executed these two:

    $.cuteTime(‘2012-08-17T09:30:29.567-07:00’);
    “4 minutes ago”
    $.cuteTime(‘2012-08-17T09:30:29-07:00’);
    “13 minutes ago”

    The second call is correct. The first (which has millisecond precision) is not.
    I am trying to figure out where in the cutetime lib to fix this but figured I’d report it in case someone else comes up with a solution faster than me.

    Like

    1. Ok I figured out the problem. It resides in this bit of code which sets the UTC milliseconds:

      if (!isEmpty(iso_date[13])) {
      new_date.setUTCMilliseconds(iso_date[13]*1000);
      }

      I don’t think we should multiply by 1000.
      It should simply be:
      new_date.setUTCMilliseconds(iso_date[13]);

      Like

      1. I don’t think that’s right. JS timestamps are in MS, and ISO timestamps are in seconds. I’d bet it’s a regular expression that doesn’t look for non-integer numbers in the seconds slot – if true, and that’s fixed, then multiplying by 1000 is still correct.

        Like

        1. You are right that the numeric representation of a JS timestamp is in milliseconds and ISO timestamp is in seconds however this is in the code which converts an iso8601 formatted string into a javascript Date object. Such a string looks as follows:
          2009-11-24T19:20:30+01:00
          or
          2009-11-24T19:20:30.123+01:00

          The time portion of an iso date string may have a millisecond portion like: hh:mm:ss.sss
          The sss portion represents the milliseconds within the second and it ranges from 000 to 999.

          The code snippet I referred to uses a regular expression to parse the “sss” portion from the date string then multiply it by 1000. This is incorrect. The “sss” portion should be converted to an integer and set on the date object directly.

          An example might help. Converting the time portion of “2009-11-24T19:20:30.123+01:00” to a javascript Date object would look like this:

          var myDate = new Date();
          myDate.setUTCHours(19);
          myDate.setUTCMinutes(20);
          myDate.setUTCSeconds(30);
          myDate.setUTCMilliseconds(123);

          Like

  24. Thanks for the great plugin! I made a Dutch translation.

    time_ranges: [
    {bound: Number.NEGATIVE_INFINITY, cuteness: ‘In de toekomst!’,unit_size: 0},
    {bound: 0, cuteness: ‘Net Geplaatst’, unit_size: 0},
    {bound: 20 * 1000, cuteness: ‘Paar seconden geleden’, unit_size: 0},
    {bound: 60 * 1000, cuteness: ‘Een minuut geleden’, unit_size: 0},
    {bound: 60 * 1000 * 2, cuteness: ‘ Minuten gelden’, unit_size: 60 * 1000},
    {bound: 60 * 1000 * 60, cuteness: ‘Een uur geleden’, unit_size: 0},
    {bound: 60 * 1000 * 60 * 2, cuteness: ‘ Uren geleden’, unit_size: 60 * 1000 * 60},
    {bound: 60 * 1000 * 60 * 24, cuteness: ‘Gisteren’, unit_size: 0},
    {bound: 60 * 1000 * 60 * 24 * 2, cuteness: ‘ Dagen geleden’, unit_size: 60 * 1000 * 60 * 24},
    {bound: 60 * 1000 * 60 * 24 * 30, cuteness: ‘Vorige maand’, unit_size: 0},
    {bound: 60 * 1000 * 60 * 24 * 30 * 2, cuteness: ‘ Maanden geleden’, unit_size: 60 * 1000 * 60 * 24 * 30},
    {bound: 60 * 1000 * 60 * 24 * 30 * 12, cuteness: ‘Vorig jaar’, unit_size: 0},
    {bound: 60 * 1000 * 60 * 24 * 30 * 12 * 2, cuteness: ‘ Jaren geleden’, unit_size: 60 * 1000 * 60 * 24 * 30 * 12},
    {bound: Number.POSITIVE_INFINITY, cuteness: ‘Moeilijk lang geleden’, unit_size: 0}
    ]
    };

    Like

  25. Hello, this is a right and full russian translation:

    var rus = {
    time_ranges: [
    {bound: Number.NEGATIVE_INFINITY,
    cuteness: ‘в будущем’, unit_size: 0},
    {bound: 0,
    cuteness: ‘сейчас’, unit_size: 0},
    {bound: 20 * 1000,
    cuteness: ‘несколько секунд назад’, unit_size: 0},
    {bound: 60 * 1000,
    cuteness: ‘около минуты назад’, unit_size: 0},
    {bound: 60 * 1000 * 2,
    cuteness: ‘ минуты назад’, unit_size: 60 * 1000},
    {bound: 60 * 1000 * 5,
    cuteness: ‘ минут назад’, unit_size: 60 * 1000},
    {bound: 60 * 1000 * 21,
    cuteness: ‘ минуту назад’, unit_size: 60 * 1000},
    {bound: 60 * 1000 * 22,
    cuteness: ‘ минуты назад’, unit_size: 60 * 1000},
    {bound: 60 * 1000 * 25,
    cuteness: ‘ минут назад’, unit_size: 60 * 1000},
    {bound: 60 * 1000 * 31,
    cuteness: ‘ минуту назад’, unit_size: 60 * 1000},
    {bound: 60 * 1000 * 32,
    cuteness: ‘ минуты назад’, unit_size: 60 * 1000},
    {bound: 60 * 1000 * 35,
    cuteness: ‘ минут назад’, unit_size: 60 * 1000},
    {bound: 60 * 1000 * 41,
    cuteness: ‘ минуту назад’, unit_size: 60 * 1000},
    {bound: 60 * 1000 * 42,
    cuteness: ‘ минуты назад’, unit_size: 60 * 1000},
    {bound: 60 * 1000 * 45,
    cuteness: ‘ минут назад’, unit_size: 60 * 1000},
    {bound: 60 * 1000 * 51,
    cuteness: ‘ минуту назад’, unit_size: 60 * 1000},
    {bound: 60 * 1000 * 52,
    cuteness: ‘ минуты назад’, unit_size: 60 * 1000},
    {bound: 60 * 1000 * 55,
    cuteness: ‘ минут назад’, unit_size: 60 * 1000},
    {bound: 60 * 1000 * 60,
    cuteness: ‘около часа назад’, unit_size: 0},
    {bound: 60 * 1000 * 60 * 2,
    cuteness: ‘ часа назад’, unit_size: 60 * 1000 * 60},
    {bound: 60 * 1000 * 60 * 5,
    cuteness: ‘ часов назад’, unit_size: 60 * 1000 * 60},
    {bound: 60 * 1000 * 60 * 21,
    cuteness: ‘ час назад’, unit_size: 60 * 1000 * 60},
    {bound: 60 * 1000 * 60 * 22,
    cuteness: ‘ часа назад’, unit_size: 60 * 1000 * 60},
    {bound: 60 * 1000 * 60 * 24,
    cuteness: ‘вчера’, unit_size: 0},
    {bound: 60 * 1000 * 60 * 24 * 2,
    cuteness: ‘ дня назад’, unit_size: 60 * 1000 * 60 * 24},
    {bound: 60 * 1000 * 60 * 24 * 5,
    cuteness: ‘ дней назад’, unit_size: 60 * 1000 * 60 * 24},
    {bound: 60 * 1000 * 60 * 24 * 21,
    cuteness: ‘ день назад’, unit_size: 60 * 1000 * 60 * 24},
    {bound: 60 * 1000 * 60 * 24 * 22,
    cuteness: ‘ дня назад’, unit_size: 60 * 1000 * 60 * 24},
    {bound: 60 * 1000 * 60 * 24 * 25,
    cuteness: ‘ дней назад’, unit_size: 60 * 1000 * 60 * 24},
    {bound: 60 * 1000 * 60 * 24 * 30,
    cuteness: ‘в прошлом месяце’, unit_size: 0},
    {bound: 60 * 1000 * 60 * 24 * 30 * 2,
    cuteness: ‘ месяца назад’, unit_size: 60 * 1000 * 60 * 24 * 30},
    {bound: 60 * 1000 * 60 * 24 * 30 * 5,
    cuteness: ‘ месяцев назад’, unit_size: 60 * 1000 * 60 * 24 * 30},
    {bound: 60 * 1000 * 60 * 24 * 30 * 12,
    cuteness: ‘в прошлом году’, unit_size: 0},
    {bound: 60 * 1000 * 60 * 24 * 30 * 12 * 2,
    cuteness: ‘ года назад’, unit_size: 60 * 1000 * 60 * 24 * 30 * 12},
    {bound: 60 * 1000 * 60 * 24 * 30 * 12 * 5,
    cuteness: ‘ лет назад’, unit_size: 60 * 1000 * 60 * 24 * 30 * 12},
    {bound: Number.POSITIVE_INFINITY,
    cuteness: ‘давно’, unit_size: 0}
    ]
    };

    Like

  26. This FTW!

    $.fn.cuteTime.settings = {
    refresh: -1, // time in milliseconds before next refresh of page data; -1 == no refresh
    time_ranges: [
    {bound: Number.NEGATIVE_INFINITY, // IMPORANT: bounds MUST be in ascending order, from negative infinity to positive infinity
    cuteness: ‘01110100 01101000 01100101 00100000 01100110 01110101 01110100 01110101 01110010 01100101 00100001’, unit_size: 0},
    {bound: 0,
    cuteness: ‘01101010 01110101 01110011 01110100 00100000 01101110 01101111 01110111’, unit_size: 0},
    {bound: 20 * 1000,
    cuteness: ‘01100001 00100000 01100110 01100101 01110111 00100000 01110011 01100101 01100011 01101111 01101110 01100100 01110011 00100000 01100001 01100111 01101111’, unit_size: 0},
    {bound: 60 * 1000,
    cuteness: ‘01100001 00100000 01101101 01101001 01101110 01110101 01110100 01100101 00100000 01100001 01100111 01101111’, unit_size: 0},
    {bound: 60 * 1000 * 2,
    cuteness: ‘ 01101101 01101001 01101110 01110101 01110100 01100101 01110011 00100000 01100001 01100111 01101111’, unit_size: 60 * 1000},
    {bound: 60 * 1000 * 60,
    cuteness: ‘01100001 01101110 00100000 01101000 01101111 01110101 01110010 00100000 01100001 01100111 01101111’, unit_size: 0},
    {bound: 60 * 1000 * 60 * 2,
    cuteness: ‘ 01101000 01101111 01110101 01110010 01110011 00100000 01100001 01100111 01101111’, unit_size: 60 * 1000 * 60},
    {bound: 60 * 1000 * 60 * 24,
    cuteness: ‘01111001 01100101 01110011 01110100 01100101 01110010 01100100 01100001 01111001’, unit_size: 0},
    {bound: 60 * 1000 * 60 * 24 * 2,
    cuteness: ‘ 01100100 01100001 01111001 01110011 00100000 01100001 01100111 01101111’, unit_size: 60 * 1000 * 60 * 24},
    {bound: 60 * 1000 * 60 * 24 * 30,
    cuteness: ‘01101100 01100001 01110011 01110100 00100000 01101101 01101111 01101110 01110100 01101000’, unit_size: 0},
    {bound: 60 * 1000 * 60 * 24 * 30 * 2,
    cuteness: ‘ 01101101 01101111 01101110 01110100 01101000 01110011 00100000 01100001 01100111 01101111’, unit_size: 60 * 1000 * 60 * 24 * 30},
    {bound: 60 * 1000 * 60 * 24 * 30 * 12,
    cuteness: ‘01101100 01100001 01110011 01110100 00100000 01111001 01100101 01100001 01110010’, unit_size: 0},
    {bound: 60 * 1000 * 60 * 24 * 30 * 12 * 2,
    cuteness: ‘ 01111001 01100101 01100001 01110010 01110011 00100000 01100001 01100111 01101111’, unit_size: 60 * 1000 * 60 * 24 * 30 * 12},
    {bound: Number.POSITIVE_INFINITY,
    cuteness: ‘01100001 00100000 01100010 01101100 01101001 01101110 01101011 01101100 01100101 00100000 01100001 01100111 01101111’, unit_size: 0}
    ]
    };

    Like

  27. I was suggested this blog by means oof my cousin. I am no lonmger certain whether orr
    not thgis publish is written by means of him as no one else know such unique about my problem.

    You’re wonderful! Tank you!

    Like

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.