Skip to content

Commit

Permalink
version 1.0.4 fix #43 #44
Browse files Browse the repository at this point in the history
  • Loading branch information
babakhani committed Jan 27, 2018
1 parent 757347d commit 8804e24
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 16 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [1.0.4] - 2018-1-27
- Fix [43](https://github.com/babakhani/PersianDate/issues/43)
- Fix [44](https://github.com/babakhani/PersianDate/issues/44)

## [1.0.3] - 2017-12-24
- Fix [183](https://github.com/babakhani/pwt.datepicker/issues/183)
- Fix [41](https://github.com/babakhani/PersianDate/issues/41)
Expand Down
12 changes: 6 additions & 6 deletions dist/persian-date.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*!
*
* persian-date - 1.0.3
* persian-date - 1.0.4
* Reza Babakhani <[email protected]>
* http://babakhani.github.io/PersianWebToolkit/docs/persian-date/
* Under WTFPL license
Expand Down Expand Up @@ -262,7 +262,7 @@ var PersianDateClass = function () {
this.leapYearMode = PersianDateClass.leapYearMode;

this.algorithms = new Algorithms(this);
this.version = "1.0.3";
this.version = "1.0.4";
this._utcMode = false;
if (this.localType !== 'fa') {
this.formatPersian = false;
Expand Down Expand Up @@ -1481,22 +1481,22 @@ var PersianDateClass = function () {
//September 4th 1986 8:30 PM
case 'LLL':
{
return self.format('MMMM YYYY DD h:m a');
return self.format('MMMM YYYY DD H:m a');
}
// Sep 4 1986 8:30 PM
case 'lll':
{
return self.format('MMM YYYY DD h:m a');
return self.format('MMM YYYY DD H:m a');
}
//Thursday, September 4th 1986 8:30 PM
case 'LLLL':
{
return self.format('dddd D MMMM YYYY h:m a');
return self.format('dddd D MMMM YYYY H:m a');
}
// Thu, Sep 4 1986 8:30 PM
case 'llll':
{
return self.format('ddd D MMM YYYY h:m a');
return self.format('ddd D MMM YYYY H:m a');
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions dist/persian-date.min.js

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"name": "persian-date",
"version": "1.0.3",
"version": "1.0.4",
"license": "WTFPL",
"main": "dist/persian-date",
"author": "Reza Babakhani <[email protected]>",
"description": "Javascript date library for parsing, validating, manipulating, and formatting persian dates System.",
"keywords": [
Expand Down
8 changes: 4 additions & 4 deletions src/pDate.js
Original file line number Diff line number Diff line change
Expand Up @@ -1191,19 +1191,19 @@ class PersianDateClass {
}
//September 4th 1986 8:30 PM
case ('LLL'): {
return self.format('MMMM YYYY DD h:m a');
return self.format('MMMM YYYY DD H:m a');
}
// Sep 4 1986 8:30 PM
case ('lll'): {
return self.format('MMM YYYY DD h:m a');
return self.format('MMM YYYY DD H:m a');
}
//Thursday, September 4th 1986 8:30 PM
case ('LLLL'): {
return self.format('dddd D MMMM YYYY h:m a');
return self.format('dddd D MMMM YYYY H:m a');
}
// Thu, Sep 4 1986 8:30 PM
case ('llll'): {
return self.format('ddd D MMM YYYY h:m a');
return self.format('ddd D MMM YYYY H:m a');
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions test/gregorian.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ describe('format', function () {
pDate.toCalendar('gregorian');
pDate.toLocale('en');
assert.deepEqual(new pDate(defaultArray).format(), '2017-01-01 12:32:40 PM');
assert.deepEqual(new pDate(defaultArray).format('lllll'), 'Sun 1 Jan 2017 0:32 PM2017/1/1');
assert.deepEqual(new pDate(defaultArray).format('llll'), 'Sun 1 Jan 2017 0:32 PM');
assert.deepEqual(new pDate(defaultArray).format('lll'), 'Jan 2017 01 0:32 PM');
assert.deepEqual(new pDate(defaultArray).format('lllll'), 'Sun 1 Jan 2017 12:32 PM2017/1/1');
assert.deepEqual(new pDate(defaultArray).format('llll'), 'Sun 1 Jan 2017 12:32 PM');
assert.deepEqual(new pDate(defaultArray).format('lll'), 'Jan 2017 01 12:32 PM');
assert.deepEqual(new pDate(defaultArray).format('ll'), 'Jan 01 2017');
assert.deepEqual(new pDate(defaultArray).format('l'), '2017/1/1');
assert.deepEqual(new pDate(defaultArray).format('dddd'), 'Sunday');
Expand Down

0 comments on commit 8804e24

Please sign in to comment.