Skip to content

Commit 166dea8

Browse files
authored
Merge pull request #118 from wmde/getYear
Restore TimeValue.getYear still used by ValueView
2 parents 1b6d718 + 3a7a1f8 commit 166dea8

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

DataValuesJavaScript.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
return 1;
88
}
99

10-
define( 'DATA_VALUES_JAVASCRIPT_VERSION', '0.8.4' );
10+
define( 'DATA_VALUES_JAVASCRIPT_VERSION', '0.9.0' );
1111

1212
// Include the composer autoloader if it is present.
1313
if ( is_readable( __DIR__ . '/vendor/autoload.php' ) ) {

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ On [Packagist](https://packagist.org/packages/data-values/javascript):
1111

1212
## Release notes
1313

14+
### 0.9.0 (dev)
15+
* Deprecated `dataValues.TimeValue.getYear`.
16+
* Removed `dataValues.TimeValue.getMonth`, `getDay`, `getHour`, `getMinute`, and `getSecond`.
17+
* Made `globeCoordinate.GlobeCoordinate.getDecimal` private.
18+
1419
### 0.8.4 (2017-07-18)
1520
* Updated JSDoc tags mistakenly requiring objects.
1621
* Removed an unused dependency on `composer/installers`.

src/values/TimeValue.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,16 @@ var SELF = dv.TimeValue = util.inherit( 'DvTimeValue', PARENT, function( timesta
150150
return this.toJSON();
151151
},
152152

153+
/**
154+
* @since 0.7
155+
* @deprecated since 0.9
156+
*
157+
* @return {string}
158+
*/
159+
getYear: function() {
160+
return /^[+-]\d+/.exec( this.timestamp )[0];
161+
},
162+
153163
/**
154164
* @inheritdoc
155165
*/

0 commit comments

Comments
 (0)