Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Add a %e item for strftime #1

Closed
wants to merge 1 commit into from

2 participants

@jlecour

Number of the day, without 0 padding on the left

@jlecour jlecour Add a %e item for strftime
Number of the day, without 0 padding on the left
acf6e1c
@bkeepers
Owner

/cc #5

@bkeepers bkeepers closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 5, 2011
  1. @jlecour

    Add a %e item for strftime

    jlecour authored
    Number of the day, without 0 padding on the left
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 1 deletion.
  1. +2 −1  jquery.relatize_date.js
View
3  jquery.relatize_date.js
@@ -33,7 +33,7 @@
return new Array((2 - string.length) + 1).join('0') + string
};
- return format.replace(/\%([aAbBcdHImMpSwyY])/g, function(part) {
+ return format.replace(/\%([aAbBcdeHImMpSwyY])/g, function(part) {
switch(part[1]) {
case 'a': return $r.shortDays[day]; break;
case 'A': return $r.days[day]; break;
@@ -41,6 +41,7 @@
case 'B': return $r.months[month]; break;
case 'c': return date.toString(); break;
case 'd': return pad(date.getDate()); break;
+ case 'e': return date.getDate(); break;
case 'H': return pad(hours); break;
case 'I': return pad((hours + 12) % 12); break;
case 'm': return pad(month + 1); break;
Something went wrong with that request. Please try again.