vendor/assets/javascripts/pickadate/picker.date.js in pickadate-rails-1.0.1 vs vendor/assets/javascripts/pickadate/picker.date.js in pickadate-rails-1.0.2
- old
+ new
@@ -1,8 +1,8 @@
/*!
- * Date picker for pickadate.js v3.0.4
+ * Date picker for pickadate.js v3.0.5
* http://amsul.github.io/pickadate.js/date.htm
*/
/*jshint
debug: true,
@@ -456,11 +456,11 @@
* Various formats to display the object in.
*/
DatePicker.prototype.formats = (function() {
// Return the length of the first word in a collection.
- var getWordLengthFromCollection = function( string, collection, dateObject ) {
+ function getWordLengthFromCollection( string, collection, dateObject ) {
// Grab the first word from the string.
var word = string.match( /\w+/ )[ 0 ]
// If there's no month index, add it to the date object
@@ -468,9 +468,14 @@
dateObject.m = collection.indexOf( word )
}
// Return the length of the word.
return word.length
+ }
+
+ // Get the length of the first word in a string.
+ function getFirstWordLength( string ) {
+ return string.match( /\w+/ )[ 0 ].length
}
return {
d: function( string, dateObject ) {