Skip to content

Commit

Permalink
Updating to 0.6.1
Browse files Browse the repository at this point in the history
Adding Portuguese, Italian, and French language support
Updating string arrays to use "Part_Part".split("_") instead of
["Part","Part"]
  • Loading branch information
timrwood committed Oct 11, 2011
1 parent 1e4268e commit ae5916e
Show file tree
Hide file tree
Showing 7 changed files with 103 additions and 63 deletions.
6 changes: 5 additions & 1 deletion README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Underscore.date is a javascript date library that helps create, manipulate, and

Author: Tim Wood

Version: 0.6.0
Version: 0.6.1

**Note:** There are some api changes that will break your code when upgrading from 0.4.1 to 0.5.0. Read about the changes in the changelog at the bottom of the page.

Expand Down Expand Up @@ -712,6 +712,10 @@ Underscore.date is freely distributable under the terms of the MIT license.
Changelog
=========

### 0.6.1

Added Portuguese, Italian, and French language support

### 0.6.0

Added _date.lang() support.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "underscore.date",
"version": "0.6.0",
"version": "0.6.1",
"description": "Underscore.date is a javascript date library that helps create, manipulate, and format dates without extending the `Date` prototype.",
"homepage": "https://github.com/timrwood/underscore.date",
"author": "Tim Wood <[email protected]> (http://timwoodcreates.com/)",
Expand Down
36 changes: 18 additions & 18 deletions underscore.date.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// (c) 2011 Tim Wood
// Underscore.date is freely distributable under the terms of the MIT license.
//
// Version 0.6.0
// Version 0.6.1

(function (undefined) {

Expand Down Expand Up @@ -322,24 +322,24 @@

// set default language
_date.lang('en', {
months : ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
monthsShort : ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
weekdays : ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
weekdaysShort : ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
months : "January_February_March_April_May_June_July_August_September_October_November_December".split("_"),
monthsShort : "Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),
weekdays : "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),
weekdaysShort : "Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),
relativeTime : {
future: "in %s",
past: "%s ago",
s: "seconds",
m: "a minute",
mm: "%d minutes",
h: "an hour",
hh: "%d hours",
d: "a day",
dd: "%d days",
M: "a month",
MM: "%d months",
y: "a year",
yy: "%d years"
future : "in %s",
past : "%s ago",
s : "seconds",
m : "a minute",
mm : "%d minutes",
h : "an hour",
hh : "%d hours",
d : "a day",
dd : "%d days",
M : "a month",
MM : "%d months",
y : "a year",
yy : "%d years"
},
ordinal : function (number) {
var b = number % 10;
Expand Down
37 changes: 37 additions & 0 deletions underscore.date.lang/fr.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
(function () {
var lang = {
months : "Janvier_Février_Mars_Avril_Mai_Juin_Juillet_Aout_Septembre_Octobre_Novembre_Décembre".split("_"),
monthsShort : "Jan_Fev_Mar_Avr_Mai_Jui_Jui_Aou_Sep_Oct_Nov_Dec".split("_"),
weekdays : "Dimanche_Lundi_Mardi_Mercredi_Jeudi_Vendredi_Samedi".split("_"),
weekdaysShort : "Dim_Lun_Mar_Mer_Jeu_Ven_Sam".split("_"),
relativeTime : {
future : "in %s",
past : "il y a %s",
s : "secondes",
m : "une minute",
mm : "%d minutes",
h : "une heure",
hh : "%d heures",
d : "un jour",
dd : "%d jours",
M : "un mois",
MM : "%d mois",
y : "une année",
yy : "%d années"
},
ordinal : function(number) {
var b = num % 10;
return (~~ (number % 100 / 10) === 1) ? 'er' : 'ème';
}
},
abbr = 'fr';

// Node
if (typeof module !== 'undefined') {
module.exports = {lang : lang, abbr : abbr};
}
// Browser
if (typeof window !== 'undefined' && this._date && this._date.lang) {
this._date.lang(abbr, lang);
}
}());
45 changes: 22 additions & 23 deletions underscore.date.lang/it.js
Original file line number Diff line number Diff line change
@@ -1,28 +1,27 @@
(function () {
var lang = {
formatString: 'dddd DD MMMM YYYY HH:mm',
months: ["Gennaio", "Febbraio", "Marzo", "Aprile", "Maggio", "Giugno", "Luglio", "Agosto", "Settebre", "Ottobre", "Novembre", "Dicembre"],
monthsShort: ["Gen", "Feb", "Mar", "Apr", "Mag", "Giu", "Lug", "Ago", "Set", "Ott", "Nov", "Dic"],
weekdays: ["Domenica", "Lunedi", "Martedi", "Mercoledi", "Giovedi", "Venerdi", "Sabato"],
weekdaysShort: ["Dom", "Lun", "Mar", "Mer", "Gio", "Ven", "Sab"],
relativeTime: {
future: "in %s",
past: "%s fa",
s: "secondi",
m: "un minuto",
mm: "%d minuti",
h: "un ora",
hh: "%d ore",
d: "un giorno",
dd: "%d giorni",
M: "un mese",
MM: "%d mesi",
y: "un anno",
yy: "%d anni"
},
ordinal: function () {
return 'º';
}
months : "Gennaio_Febbraio_Marzo_Aprile_Maggio_Giugno_Luglio_Agosto_Settebre_Ottobre_Novembre_Dicembre".split("_"),
monthsShort : "Gen_Feb_Mar_Apr_Mag_Giu_Lug_Ago_Set_Ott_Nov_Dic".split("_"),
weekdays : "Domenica_Lunedi_Martedi_Mercoledi_Giovedi_Venerdi_Sabato".split("_"),
weekdaysShort : "Dom_Lun_Mar_Mer_Gio_Ven_Sab".split("_"),
relativeTime : {
future : "in %s",
past : "%s fa",
s : "secondi",
m : "un minuto",
mm : "%d minuti",
h : "un ora",
hh : "%d ore",
d : "un giorno",
dd : "%d giorni",
M : "un mese",
MM : "%d mesi",
y : "un anno",
yy : "%d anni"
},
ordinal: function () {
return 'º';
}
},
abbr = 'it';

Expand Down
36 changes: 18 additions & 18 deletions underscore.date.lang/pt.js
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
(function () {
var lang = {
months : ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"],
monthsShort : ["Jan", "Feb", "Mar", "Abr", "Mai", "Jun", "Jul", "Ago", "Set", "Out", "Nov", "Dez"],
weekdays : ["Domingo", "Segunda-feira", "Terça-feira", "Quarta-feira", "Quinta-feira", "Sexta-feira", "Sábado"],
weekdaysShort : ["Dom", "Seg", "Ter", "Qua", "Qui", "Sex", "Sáb"],
months : "Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro".split("_"),
monthsShort : "Jan_Feb_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),
weekdays : "Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado".split("_"),
weekdaysShort : "Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),
relativeTime : {
future: "em %s",
past: "%s atrás",
s: "segundos",
m: "um minuto",
mm: "%d minutos",
h: "uma hora",
hh: "%d horas",
d: "um dia",
dd: "%d dias",
M: "um mês",
MM: "%d meses",
y: "um ano",
yy: "%d anos"
future : "em %s",
past : "%s atrás",
s : "segundos",
m : "um minuto",
mm : "%d minutos",
h : "uma hora",
hh : "%d horas",
d : "um dia",
dd : "%d dias",
M : "um mês",
MM : "%d meses",
y : "um ano",
yy : "%d anos"
},
ordinal : function (number) {
return 'º';
},
}
},
abbr = 'pt';

Expand Down
4 changes: 2 additions & 2 deletions underscore.date.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ae5916e

Please sign in to comment.