diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..a95b87e --- /dev/null +++ b/.npmignore @@ -0,0 +1,4 @@ +lib +test +build.xml +build.properties diff --git a/README.md b/README.md index db87ca8..ca9703b 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +[![npm version](https://badge.fury.io/js/jquery-format.svg)](https://badge.fury.io/js/jquery-format) + # jQuery Format The jQuery Format plugin enables the formatting and parsing of dates and numbers. It's a @@ -22,20 +24,20 @@ of the en_US locale. The locale can be globally configured using the following: $.format.locale({ date: { - format: 'dddd, MMMM dd, yyyy h:mm:ss tt', - monthsFull: ['January','February','March','April','May','June','July','August','September','October','November','December'], + format: 'MMM dd, yyyy h:mm:ss a', + monthsFull: ['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'], daysFull: ['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'], daysShort: ['Sun','Mon','Tue','Wed','Thu','Fri','Sat'], - timeFormat: 'h:mm tt', - shortDateFormat: 'M/d/yyyy', - longDateFormat: 'dddd, MMMM dd, yyyy' + shortDateFormat: 'M/d/yyyy h:mm a', + longDateFormat: 'EEEE, MMMM dd, yyyy h:mm:ss a' }, number: { format: '#,##0.0#', groupingSeparator: ',', decimalSeparator: '.' - } + } }); ## Changes @@ -60,4 +62,4 @@ of the en_US locale. The locale can be globally configured using the following: ### 12/23/2009 - jQuery Format 1.0 -Initial release \ No newline at end of file +Initial release diff --git a/package.json b/package.json new file mode 100644 index 0000000..a5771a6 --- /dev/null +++ b/package.json @@ -0,0 +1,18 @@ +{ + "name": "jquery-format", + "description": "The jQuery Format plugin enables the formatting and parsing of dates and numbers.", + "version": "1.3.1", + "author": "Rostislav Hristov", + "license": "MIT", + "main": "./src/jquery.format.js", + "repository": { + "type": "git", + "url": "https://github.com/asual/jquery-format" + }, + "bugs": { + "url": "https://github.com/asual/jquery-format/issues" + }, + "keywords": [ + "format" + ] +} diff --git a/src/i18n/tr.js b/src/i18n/tr.js new file mode 100644 index 0000000..02673a0 --- /dev/null +++ b/src/i18n/tr.js @@ -0,0 +1,17 @@ +$.format.locale({ + date: { + format: 'dd.MMM.yyyy HH:mm:ss', + monthsFull: ['Ocak', 'Şubat', 'Mart', 'Nisan', 'Mayıs', 'Haziran', + 'Temmuz', 'Ağustos', 'Eylül', 'Ekim', 'Kasım', 'Aralık'], + monthsShort: ['Oca', 'Şub', 'Mar', 'Nis', 'May', 'Haz', 'Tem', 'Ağu', 'Eyl', 'Eki', 'Kas', 'Ara'], + daysFull: ['Pazar', 'Pazartesi', 'Salı', 'Çarşamba', 'Perşembe', 'Cuma', 'Cumartesi'], + daysShort: ['Paz', 'Pzt', 'Sal', 'Çar', 'Per', 'Cum', 'Cmt'], + shortDateFormat: 'dd.MM.yyyy', + longDateFormat: 'dd MMMM yyyy EEEE HH:mm:ss' + }, + number: { + format: '#,##0.00', + groupingSeparator: '.', + decimalSeparator: ',' + } +});