From: Tim Wood Date: Tue, 29 Nov 2011 17:29:29 +0000 (-0800) Subject: Building site with isDST and moment.fn.zone X-Git-Tag: 1.2.0~24 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=79fb012cae42534dbdbccb0031c044e1092d819d;p=thirdparty%2Fmoment.git Building site with isDST and moment.fn.zone --- diff --git a/moment.min.js b/moment.min.js index b2858705f..40de46af2 100755 --- a/moment.min.js +++ b/moment.min.js @@ -1,2 +1,2 @@ /* Moment.js | version : 1.1.2 | author : Tim Wood | license : MIT */ -(function(a,b){function k(a,b){var c=a+"";while(c.length11?r.pm:r.am;case"A":return i>11?r.PM:r.AM;case"H":return i;case"HH":return k(i,2);case"h":return i%12||12;case"hh":return k(i%12||12,2);case"m":return j;case"mm":return k(j,2);case"s":return l;case"ss":return k(l,2);case"zz":case"z":return(b.toString().match(p)||[""])[0].replace(n,"");case"L":case"LL":case"LLL":case"LLLL":return o(b,c.longDateFormat[d]);default:return d.replace("\\","")}}var e=b.getMonth(),f=b.getDate(),g=b.getFullYear(),h=b.getDay(),i=b.getHours(),j=b.getMinutes(),l=b.getSeconds(),m=/(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|dddd?|do?|w[o|w]?|YYYY|YY|a|A|hh?|HH?|mm?|ss?|zz?|LL?L?L?)/g,n=/[^A-Z]/g,p=/\([A-Za-z ]+\)|:[0-9]{2} [A-Z]{3} /g,q=c.ordinal,r=c.meridiem;return d.replace(m,s)}function p(a,b){function j(a,b){switch(a){case"M":case"MM":c[1]=~~b-1;break;case"D":case"DD":case"DDD":case"DDDD":c[2]=~~b;break;case"YY":b=~~b,c[0]=b+(b>70?1900:2e3);break;case"YYYY":c[0]=~~b;break;case"a":case"A":i=b.toLowerCase()==="pm";break;case"H":case"HH":case"h":case"hh":c[3]=~~b;break;case"m":case"mm":c[4]=~~b;break;case"s":case"ss":c[5]=~~b}}var c=[0],d=/(\\)?(MM?|DD?D?D?|YYYY|YY|a|A|hh?|HH?|mm?|ss?)/g,e=/(\\)?([0-9]+|am|pm)/gi,f=a.match(e),g=b.match(d),h,i;for(h=0;h11?r.pm:r.am;case"A":return i>11?r.PM:r.AM;case"H":return i;case"HH":return k(i,2);case"h":return i%12||12;case"hh":return k(i%12||12,2);case"m":return j;case"mm":return k(j,2);case"s":return l;case"ss":return k(l,2);case"zz":case"z":return(b.toString().match(p)||[""])[0].replace(n,"");case"L":case"LL":case"LLL":case"LLLL":return o(b,c.longDateFormat[d]);default:return d.replace("\\","")}}var e=b.getMonth(),f=b.getDate(),g=b.getFullYear(),h=b.getDay(),i=b.getHours(),j=b.getMinutes(),l=b.getSeconds(),m=/(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|dddd?|do?|w[o|w]?|YYYY|YY|a|A|hh?|HH?|mm?|ss?|zz?|LL?L?L?)/g,n=/[^A-Z]/g,p=/\([A-Za-z ]+\)|:[0-9]{2} [A-Z]{3} /g,q=c.ordinal,r=c.meridiem;return d.replace(m,s)}function p(a,b){function j(a,b){switch(a){case"M":case"MM":c[1]=~~b-1;break;case"D":case"DD":case"DDD":case"DDDD":c[2]=~~b;break;case"YY":b=~~b,c[0]=b+(b>70?1900:2e3);break;case"YYYY":c[0]=~~b;break;case"a":case"A":i=b.toLowerCase()==="pm";break;case"H":case"HH":case"h":case"hh":c[3]=~~b;break;case"m":case"mm":c[4]=~~b;break;case"s":case"ss":c[5]=~~b}}var c=[0],d=/(\\)?(MM?|DD?D?D?|YYYY|YY|a|A|hh?|HH?|mm?|ss?)/g,e=/(\\)?([0-9]+|am|pm)/gi,f=a.match(e),g=b.match(d),h,i;for(h=0;hMoment.js Documentation

Moment.js Documentation

A lightweight javascript date library for parsing, manipulating, and formatting dates.

Where to get it

Github

Production Version 1.1.22.6kb minified & gzippedDevelopment Version 1.1.218.3kb full source + comments

You can also clone the project with Git by running:

git clone git://github.com/timrwood/moment

npm

npm install moment

Where to use it

Moment was designed to work in both the browser and in NodeJS. All code will work in both environments. All unit tests are run in both environments.

In NodeJS

var moment = require('moment');
+Moment.js Documentation

Moment.js Documentation

A lightweight javascript date library for parsing, manipulating, and formatting dates.

Where to get it

Github

Production Version 1.1.22.6kb minified & gzippedDevelopment Version 1.1.218.6kb full source + comments

You can also clone the project with Git by running:

git clone git://github.com/timrwood/moment

npm

npm install moment

Where to use it

Moment was designed to work in both the browser and in NodeJS. All code will work in both environments. All unit tests are run in both environments.

In NodeJS

var moment = require('moment');
 moment().add('hours', 1).fromNow(); // "1 hour ago"
 

In the browser

<script src="moment.min.js"></script>
 moment().add('hours', 1).fromNow(); // "1 hour ago"
@@ -197,7 +197,7 @@ moment(1316116057189).fromNow(); // il y a une heure
         (b === 2) ? 'nd' : 
         (b === 3) ? 'rd' : 'th';
 };
-

For more information on ordinal numbers, see wikipedia