{:uriI"file:///Users/himn1/dev/rails/engines/loco/lib/assets/javascripts/loco/services/date.coffee?type=application/javascript&pipeline=self&id=04d7d1fa5da9fc2af1477f75788f8d7c191a3516df993b5f37a1bfc5669bb33b:ET:load_pathI"?/Users/himn1/dev/rails/engines/loco/lib/assets/javascripts;T: filenameI"Y/Users/himn1/dev/rails/engines/loco/lib/assets/javascripts/loco/services/date.coffee;T: nameI"loco/services/date;T:logical_pathI"loco/services/date.self.js;T:content_typeI"application/javascript;T: sourceI" (function() { App.Services.Date = (function() { function Date(date) { this.date = date; } Date.prototype.toString = function(format) { var skope; if (format == null) { format = 'default'; } skope = App.I18n[App.Env.loco.getLocale()].date.formats; switch (format) { case 'default': return this.strftime(skope["default"]); case 'short': return this.strftime(skope.short); case 'long': return this.strftime(skope.long); default: return console.log('App.Services.Date#toString: unknown format.'); } }; Date.prototype.strftime = function(str) { var skope; skope = App.I18n[App.Env.loco.getLocale()]; str = str.replace('%Y', (function(_this) { return function(x) { return _this.date.getFullYear(); }; })(this)); str = str.replace('%y', (function(_this) { return function(x) { return _this.date.getFullYear().toString().slice(-2); }; })(this)); str = str.replace('%m', (function(_this) { return function(x) { var month; month = _this.date.getMonth() + 1; if (month >= 10) { return month; } else { return "0" + month; } }; })(this)); str = str.replace('%b', (function(_this) { return function(x) { return skope.date.abbr_month_names[_this.date.getMonth()]; }; })(this)); str = str.replace('%B', (function(_this) { return function(x) { return skope.date.month_names[_this.date.getMonth()]; }; })(this)); str = str.replace('%d', (function(_this) { return function(x) { if (_this.date.getDate() >= 10) { return _this.date.getDate(); } else { return "0" + (_this.date.getDate()); } }; })(this)); str = str.replace('%H', (function(_this) { return function(x) { if (_this.date.getHours() >= 10) { return _this.date.getHours(); } else { return "0" + (_this.date.getHours()); } }; })(this)); return str = str.replace('%M', (function(_this) { return function(x) { if (_this.date.getMinutes() >= 10) { return _this.date.getMinutes(); } else { return "0" + (_this.date.getMinutes()); } }; })(this)); }; return Date; })(); }).call(this); ;T: metadata{ :dependencieso:Set: @hash} I"environment-version;TTI"environment-paths;TTI"jprocessors:type=application/javascript&file_type=application/javascript&engines=.coffee&pipeline=self;TTI"gfile-digest:///Users/himn1/dev/rails/engines/loco/lib/assets/javascripts/loco/services/date.coffee;TTF: requiredo;;}F: stubbedo;;}F: linkso;;}F: charsetI" utf-8;F: digest"%e1ʤ!g%E*qs}:vG"LLMr: lengthi :dependencies_digest"%pjl2{\GGSVhr:idI"E04d7d1fa5da9fc2af1477f75788f8d7c191a3516df993b5f37a1bfc5669bb33b;F: mtimel+`V