����JFIF��H�H����Exif��MM�*���� ��3����V�����3������3�(��������������������3�����
Server IP : 74.208.127.88 / Your IP : 18.191.54.249 Web Server : Apache/2.4.41 (Ubuntu) System : Linux ubuntu 5.4.0-163-generic #180-Ubuntu SMP Tue Sep 5 13:21:23 UTC 2023 x86_64 User : www-data ( 33) PHP Version : 7.4.3-4ubuntu2.29 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /var/www/html/admin/assets/plugins/moment/test/moment/ |
Upload File : |
var moment = require("../../moment"); exports.utc = { setUp : function (cb) { moment.lang('en'); cb(); }, tearDown : function (cb) { moment.lang('en'); cb(); }, "utc and local" : function (test) { test.expect(7); var m = moment(Date.UTC(2011, 1, 2, 3, 4, 5, 6)), zone, expected; m.utc(); // utc test.equal(m.date(), 2, "the day should be correct for utc"); test.equal(m.day(), 3, "the date should be correct for utc"); test.equal(m.hours(), 3, "the hours should be correct for utc"); // local m.local(); if (m.zone() > 180) { test.equal(m.date(), 1, "the date should be correct for local"); test.equal(m.day(), 2, "the day should be correct for local"); } else { test.equal(m.date(), 2, "the date should be correct for local"); test.equal(m.day(), 3, "the day should be correct for local"); } zone = Math.ceil(m.zone() / 60); expected = (24 + 3 - zone) % 24; test.equal(m.hours(), expected, "the hours (" + m.hours() + ") should be correct for local"); test.equal(moment().utc().zone(), 0, "timezone in utc should always be zero"); test.done(); }, "creating with utc" : function (test) { test.expect(7); var diff = moment.utc().valueOf() - moment().valueOf(), m; diff = Math.abs(diff); // we check the diff rather than equality because sometimes they are off by a millisecond test.ok(diff < 5, "Calling moment.utc() should default to the current time"); m = moment.utc([2011, 1, 2, 3, 4, 5, 6]); test.equal(m.date(), 2, "the day should be correct for utc array"); test.equal(m.hours(), 3, "the hours should be correct for utc array"); m = moment.utc("2011-02-02 3:04:05", "YYYY-MM-DD HH:mm:ss"); test.equal(m.date(), 2, "the day should be correct for utc parsing format"); test.equal(m.hours(), 3, "the hours should be correct for utc parsing format"); m = moment.utc("2011-02-02T03:04:05+00:00"); test.equal(m.date(), 2, "the day should be correct for utc parsing iso"); test.equal(m.hours(), 3, "the hours should be correct for utc parsing iso"); test.done(); }, "creating with utc without timezone" : function (test) { test.expect(4); var m = moment.utc("2012-01-02T08:20:00"); test.equal(m.date(), 2, "the day should be correct for utc parse without timezone"); test.equal(m.hours(), 8, "the hours should be correct for utc parse without timezone"); m = moment.utc("2012-01-02T08:20:00+09:00"); test.equal(m.date(), 1, "the day should be correct for utc parse with timezone"); test.equal(m.hours(), 23, "the hours should be correct for utc parse with timezone"); test.done(); }, "cloning with utc" : function (test) { test.expect(4); var m = moment.utc("2012-01-02T08:20:00"); test.equal(moment.utc(m)._isUTC, true, "the local zone should be converted to UTC"); test.equal(moment.utc(m.clone().utc())._isUTC, true, "the local zone should stay in UTC"); m.zone(120); test.equal(moment.utc(m)._isUTC, true, "the explicit zone should stay in UTC"); test.equal(moment.utc(m).zone(), 0, "the explicit zone should have an offset of 0"); test.done(); }, "weekday with utc" : function (test) { test.expect(1); test.equal( moment('2013-09-15T00:00:00Z').utc().weekday(), // first minute of the day moment('2013-09-15T23:59:00Z').utc().weekday(), // last minute of the day "a UTC-moment's .weekday() should not be affected by the local timezone" ); test.done(); } };