Skip to content

Commit

Permalink
fix #35 v1.0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
babakhani committed Feb 10, 2018
1 parent b385e9e commit be07931
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 10 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ 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.5] - 2018-2-11
- Fix [35](https://github.com/babakhani/PersianDate/issues/35)

## [1.0.4] - 2018-1-27
- Fix [43](https://github.com/babakhani/PersianDate/issues/43)
- Fix [44](https://github.com/babakhani/PersianDate/issues/44)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ More info at [wikipedia](http://en.wikipedia.org/wiki/Iranian_calendar)

[![npm version](https://badge.fury.io/js/persian-date.svg)](https://github.com/babakhani/persiandate)
[![Bower version](https://badge.fury.io/bo/persian-date.svg)](https://github.com/babakhani/persiandate)
[![Coverage Status](https://coveralls.io/repos/github/babakhani/PersianDate/badge.svg?branch=develop)](https://coveralls.io/github/babakhani/PersianDate?branch=develop)
[![Coverage Status](https://coveralls.io/repos/github/babakhani/PersianDate/badge.svg?branch=master)](https://coveralls.io/github/babakhani/PersianDate?branch=master)
[![Travis-ci](https://travis-ci.org/babakhani/PersianDate.svg?branch=master)](https://github.com/babakhani/persiandate)

<a class="github-button" href="https://github.com/babakhani/persiandate" data-icon="octicon-star" data-style="mega" data-count-href="/babakhani/persiandate/stargazers" data-count-api="/repos/babakhani/persiandate#stargazers_count" data-count-aria-label="# stargazers on GitHub" aria-label="Star babakhani/persiandate on GitHub">Star</a>
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "persian-date",
"version": "1.0.4",
"version": "1.0.5",
"main": [
"dist/<= pkg.version>/persian-date-<= pkg.version>.js"
],
Expand Down
6 changes: 3 additions & 3 deletions dist/persian-date.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*!
*
* persian-date - 1.0.4
* persian-date - 1.0.5
* 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.4";
this.version = "1.0.5";
this._utcMode = false;
if (this.localType !== 'fa') {
this.formatPersian = false;
Expand Down Expand Up @@ -1736,7 +1736,7 @@ var PersianDateClass = function () {
key: 'unix',
value: function unix(timestamp) {
if (timestamp) {
return new PersianDateClass(timestamp * 1000).unix();
return new PersianDateClass(timestamp * 1000);
} else {
return new PersianDateClass().unix();
}
Expand Down
4 changes: 2 additions & 2 deletions dist/persian-date.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "persian-date",
"version": "1.0.4",
"version": "1.0.5",
"license": "WTFPL",
"main": "dist/persian-date",
"author": "Reza Babakhani <[email protected]>",
Expand Down
2 changes: 1 addition & 1 deletion src/pDate.js
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,7 @@ class PersianDateClass {

static unix(timestamp) {
if (timestamp) {
return new PersianDateClass(timestamp * 1000).unix();
return new PersianDateClass(timestamp * 1000);
} else {
return new PersianDateClass().unix();
}
Expand Down
2 changes: 1 addition & 1 deletion test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,7 @@ describe('timezone', function () {
assert.deepEqual(d.valueOf(), d.toDate().valueOf());
});
it('static unix method', function () {
let a = pDate.unix(1491031614047).valueOf();
let a = pDate.unix(1491031614047).unix();
assert.deepEqual(a, 1491031614047);
let b = pDate.unix();
assert.ok(b);
Expand Down

0 comments on commit be07931

Please sign in to comment.