Skip to content

Commit

Permalink
v3.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
shepherdsam committed Feb 22, 2017
1 parent b6c6b86 commit 804db8e
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,25 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [3.1.0] - 2017-02-22

### Changes
#### Added `Utils.hasTZOffset()`
Usage:
``` js
Utils.hasTZOffset('2017-02-22 13:26 -06:00') // true
```

#### Added `Utils.applyTzOffset()`
This doesn't make JS dates timezone aware. It 'pretends' to by shifting the date.
Usage:
``` js
Utils.applyTzOffset(new Date('2017-02-22'), 'America/Chicago'); // Returns a date shifted to the timezone specified
```

### Fixes
- Worked around a bug in SugarDate when sometimes `today at 3pm` would get parsed as the next day at 3pm.

## [3.0.2] - 2017-02-13

### Fixes
Expand Down Expand Up @@ -156,6 +175,7 @@ backoff.attemptAsync(operation, options).then(res => {
### Added
- Initial release.
[3.1.0]: https://github.com/flowxo/flowxo-utils/compare/v3.0.2...v3.1.0
[3.0.2]: https://github.com/flowxo/flowxo-utils/compare/v3.0.1...v3.0.2
[3.0.1]: https://github.com/flowxo/flowxo-utils/compare/v3.0.0...v3.0.1
[3.0.0]: https://github.com/flowxo/flowxo-utils/compare/v2.1.0...v3.0.0
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": "flowxo-utils",
"version": "3.0.2",
"version": "3.1.0",
"description": "Common utilities for Flow XO.",
"main": "lib/index.js",
"scripts": {
Expand Down
2 changes: 0 additions & 2 deletions spec/specs.js
Original file line number Diff line number Diff line change
Expand Up @@ -898,7 +898,6 @@ describe('Utils', function() {
expect(d.moment.toDate()).toEqual(expectedMoment.toDate());

// .parsed is expected to be in the timezone of the host machine.
// TODO: Get this working!
expect(d.parsed).toEqual(expectedParsed.toDate());
}
[
Expand All @@ -920,7 +919,6 @@ describe('Utils', function() {
var expectedMoment = moment().tz(timezone).add(5, 'minutes');

expectDatesToBeClose(d.moment.toDate(), expectedMoment.toDate());
// TODO: Get this working!
var expectedParsed = moment().add(5, 'minutes');
expectDatesToBeClose(d.parsed, expectedParsed.toDate());
}
Expand Down

0 comments on commit 804db8e

Please sign in to comment.