Skip to content

Commit

Permalink
Item15266: update upstream moment.js package
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDaum committed Jan 22, 2024
1 parent db393f8 commit bd30ddb
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 14 deletions.
3 changes: 2 additions & 1 deletion data/System/JQMomentContrib.txt
Expand Up @@ -61,6 +61,7 @@ jQuery(function($) {

---++ Change History
%TABLE{columnwidths="7em" tablewidth="100%"}%
| 24 Jan 2024: | updated to moment.js 2.29.4 |
| 10 Apr 2022: | updated to moment.js 2.29.2 |
| 18 Nov 2019: | adjust german short month names to Foswiki standard |
| 13 Dec 2018: | updated to moment.js 2.23.0 |
Expand All @@ -73,7 +74,7 @@ jQuery(function($) {

%META:FORM{name="PackageForm"}%
%META:FIELD{name="Author" title="Author" value="Michael Daum"}%
%META:FIELD{name="Copyright" title="Copyright" value="© 2011-2022 Tim Wood (moment.js) © 2012-2022 Michael Daum (foswiki stubs)"}%
%META:FIELD{name="Copyright" title="Copyright" value="© 2011-2022 Tim Wood (moment.js) © 2012-2024 Michael Daum (foswiki stubs)"}%
%META:FIELD{name="Description" title="Description" value="%25$SHORTDESCRIPTION%25"}%
%META:FIELD{name="Home" title="Home" value="Foswiki:Extensions/%TOPIC%"}%
%META:FIELD{name="License" title="License" value="[[http://www.gnu.org/licenses/gpl.html][GPL (Gnu General Public License)]] and MIT"}%
Expand Down
7 changes: 4 additions & 3 deletions lib/Foswiki/Contrib/JQMomentContrib.pm
@@ -1,6 +1,6 @@
# Plugin for Foswiki - The Free and Open Source Wiki, http://foswiki.org/
#
# JQMomentContrib is Copyright (C) 2012-2022 Michael Daum http://michaeldaumconsulting.com
# JQMomentContrib is Copyright (C) 2012-2024 Michael Daum http://michaeldaumconsulting.com
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
Expand All @@ -18,9 +18,10 @@ package Foswiki::Contrib::JQMomentContrib;
use strict;
use warnings;

our $VERSION = '3.10';
our $RELEASE = '10 Apr 2022';
our $VERSION = '3.20';
our $RELEASE = '%$RELEASE%';
our $SHORTDESCRIPTION = 'A lightweight javascript date library for parsing, manipulating, and formatting dates';
our $LICENSECODE = '%$LICENSECODE%';
our $NO_PREFS_IN_TOPIC = 1;

1;
4 changes: 2 additions & 2 deletions lib/Foswiki/Contrib/JQMomentContrib/Core.pm
Expand Up @@ -31,7 +31,7 @@ sub new {
$class->SUPER::new(
$session,
name => 'Moment',
version => '2.29.2',
version => '2.29.4',
author => 'Tim Wood',
homepage => 'http://momentjs.com/',
javascript => ['moment.js'],
Expand Down Expand Up @@ -85,7 +85,7 @@ HERE
__END__
Foswiki - The Free and Open Source Wiki, http://foswiki.org/
Copyright (C) 2012-2019 Michael Daum http://michaeldaumconsulting.com
Copyright (C) 2012-2024 Michael Daum http://michaeldaumconsulting.com
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
Expand Down
2 changes: 1 addition & 1 deletion pub/System/JQMomentContrib/lang/Makefile
@@ -1,5 +1,5 @@
FOSWIKI_ROOT?=~/foswiki/trunk/core
TARGET=$(shell ls ../git/locale/)
TARGET=$(shell test -d ../git/locale && ls ../git/locale/)

-include $(FOSWIKI_ROOT)/pub/System/JQueryPlugin/Makefile.include

Expand Down
5 changes: 3 additions & 2 deletions pub/System/JQMomentContrib/lang/sr-cyrl.uncompressed.js
Expand Up @@ -38,15 +38,16 @@
return wordKey[2];
},
translate: function (number, withoutSuffix, key, isFuture) {
var wordKey = translator.words[key];
var wordKey = translator.words[key],
word;

if (key.length === 1) {
// Nominativ
if (key === 'y' && withoutSuffix) return 'једна година';
return isFuture || withoutSuffix ? wordKey[0] : wordKey[1];
}

const word = translator.correctGrammaticalCase(number, wordKey);
word = translator.correctGrammaticalCase(number, wordKey);
// Nominativ
if (key === 'yy' && withoutSuffix && word === 'годину') {
return number + ' година';
Expand Down
5 changes: 3 additions & 2 deletions pub/System/JQMomentContrib/lang/sr.uncompressed.js
Expand Up @@ -38,15 +38,16 @@
return wordKey[2];
},
translate: function (number, withoutSuffix, key, isFuture) {
var wordKey = translator.words[key];
var wordKey = translator.words[key],
word;

if (key.length === 1) {
// Nominativ
if (key === 'y' && withoutSuffix) return 'jedna godina';
return isFuture || withoutSuffix ? wordKey[0] : wordKey[1];
}

const word = translator.correctGrammaticalCase(number, wordKey);
word = translator.correctGrammaticalCase(number, wordKey);
// Nominativ
if (key === 'yy' && withoutSuffix && word === 'godinu') {
return number + ' godina';
Expand Down
6 changes: 3 additions & 3 deletions pub/System/JQMomentContrib/moment.uncompressed.js
@@ -1,5 +1,5 @@
//! moment.js
//! version : 2.29.2
//! version : 2.29.4
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
//! license : MIT
//! momentjs.com
Expand Down Expand Up @@ -2454,7 +2454,7 @@
function preprocessRFC2822(s) {
// Remove comments and folding whitespace and replace multiple-spaces with a single space
return s
.replace(/\([^)]*\)|[\n\t]/g, ' ')
.replace(/\([^()]*\)|[\n\t]/g, ' ')
.replace(/(\s\s+)/g, ' ')
.replace(/^\s\s*/, '')
.replace(/\s\s*$/, '');
Expand Down Expand Up @@ -5635,7 +5635,7 @@

//! moment.js

hooks.version = '2.29.2';
hooks.version = '2.29.4';

setHookCallback(createLocal);

Expand Down

0 comments on commit bd30ddb

Please sign in to comment.