Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: samsonjs/strftime
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.10.1
Choose a base ref
...
head repository: samsonjs/strftime
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.10.3
Choose a head ref
  • 16 commits
  • 10 files changed
  • 2 contributors

Commits on Dec 12, 2021

  1. 1
    Copy the full SHA
    3af7544 View commit details
  2. Fix npm shield version

    samsonjs committed Dec 12, 2021
    Copy the full SHA
    1208824 View commit details
  3. Copy the full SHA
    93aaf1e View commit details

Commits on Apr 17, 2023

  1. Fixed issue #84

    aryan-debug committed Apr 17, 2023
    Copy the full SHA
    51a6ade View commit details

Commits on May 22, 2023

  1. Fixed test case for %c

    aryan-debug committed May 22, 2023
    Copy the full SHA
    6157e8a View commit details
  2. Fixed issue #84

    aryan-debug committed May 22, 2023
    Copy the full SHA
    b50d512 View commit details

Commits on May 24, 2023

  1. Merge pull request #86 from aryan-debug/master

    Fixed issue #84
    samsonjs authored May 24, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    67c02b5 View commit details

Commits on May 25, 2023

  1. Tweak code style and minify

    samsonjs committed May 25, 2023

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    samsonjs Sami Samhuri
    Copy the full SHA
    5275347 View commit details
  2. Release v0.10.2

    samsonjs committed May 25, 2023

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    samsonjs Sami Samhuri
    Copy the full SHA
    a0a62db View commit details

Commits on May 28, 2024

  1. Stop using let, closes #87

    samsonjs committed May 28, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    samsonjs Sami Samhuri
    Copy the full SHA
    53e26ba View commit details
  2. Merge pull request #89 from samsonjs/87-using-let-requires-es6-since-…

    …v0102
    
    Stop using `let`, closes #87
    samsonjs authored May 28, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    6cf7d59 View commit details

Commits on Jun 11, 2024

  1. Fix Chinese months

    Change as described by @mogando668, closes #88
    samsonjs committed Jun 11, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    samsonjs Sami Samhuri
    Copy the full SHA
    db1c066 View commit details
  2. Merge pull request #91 from samsonjs/fix/88-chinese-months

    Fix Chinese months
    samsonjs authored Jun 11, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    8a33589 View commit details
  3. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    e61895a View commit details

Commits on Jun 12, 2024

  1. Verified

    This commit was signed with the committer’s verified signature.
    samsonjs Sami Samhuri
    Copy the full SHA
    774e3ce View commit details
  2. Update minified assets

    samsonjs committed Jun 12, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    samsonjs Sami Samhuri
    Copy the full SHA
    8db2211 View commit details
Showing with 117 additions and 66 deletions.
  1. +21 −5 Changelog.md
  2. +1 −1 Makefile
  3. +9 −6 Readme.md
  4. +1 −1 bower.json
  5. +11 −4 component.json
  6. +17 −0 package-lock.json
  7. +12 −4 package.json
  8. +21 −23 strftime-min.js
  9. +21 −21 strftime.js
  10. +3 −1 test.js
26 changes: 21 additions & 5 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
v0.10.3 on 2024-06-11
---------------------

- Stop using `let` to avoid breaking backwards compatibility with ES5. Thanks to [Maximilian Herold](https://github.com/mherold) for the report #87

- Drop '份' suffix from Chinese month names. Thanks to [@mogando668](https://github.com/mogando668) for the report #88

v0.10.2 on 2023-05-24
---------------------

- Fix test case for %c in current versions of node.js

- Fix %-y so it omits the leading zero

Thanks to [Aryan Arora](https://github.com/aryan-debug) for both fixes!

v0.10.1 on 2021-12-12
---------------------

@@ -65,14 +81,14 @@ Along with this the API has been unified and cleaned up. `strftimeTZ`, `strftime

```JavaScript
var strftime = require('strftime'); // not required in web browsers

var strftimeIT = strftime.localize(anItalianLocale);
var strftimePST = strftime.timezone('-0800');
var strftimeUTC = strftime.utc();

// You can combine them
var strftimeIT_PST = strftimeIT.timezone('-0800');

// And chain them all at once
var strftimeIT_PST = strftime.localize(anItalianLocale).timezone('-0800');
```
@@ -212,7 +228,7 @@ v0.4.5 on 2011-06-08

v0.4.4 on 2011-06-07
--------------------

- fix `%L` for values < 100

- convert tests from CoffeeScript to JavaScript
@@ -232,7 +248,7 @@ This release was all [Andrew Schaaf](https://github.com/andrewschaaf).
v0.4.2 on 2011-06-05
--------------------

- add `strftimeUTC` for ignoring timezones
- add `strftimeUTC` for ignoring timezones
Thanks to [Andrew Schaaf](https://github.com/andrewschaaf)

- support exporting to the top level object in ES5 strict mode
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@ minify: real-minify test-minified

real-minify: strftime.js
rm -f strftime-min.js
closure <strftime.js >|strftime-min.js
closure-compiler <strftime.js >|strftime-min.js

test:
TZ=America/Vancouver node test.js
15 changes: 9 additions & 6 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ strftime

strftime for JavaScript. Works in (at least) node.js and browsers. Supports localization and timezones. Most standard specifiers from C are supported as well as some other extensions from Ruby.

[![version 0.10.1 on npm](https://img.shields.io/badge/npm-0.10.0-brightgreen.svg?style=flat)](https://www.npmjs.com/package/strftime) [![node version 0.2 and up](https://img.shields.io/badge/node->=0.2-brightgreen.svg?style=flat)](https://nodejs.org) [![MIT License](https://img.shields.io/badge/License-MIT-blue.svg?style=flat)](https://sjs.mit-license.org)
[![version 0.10.3 on npm](https://img.shields.io/badge/npm-0.10.3-brightgreen.svg?style=flat)](https://www.npmjs.com/package/strftime) [![node version 0.2 and up](https://img.shields.io/badge/node->=0.2-brightgreen.svg?style=flat)](https://nodejs.org) [![MIT License](https://img.shields.io/badge/License-MIT-blue.svg?style=flat)](https://sjs.mit-license.org)

Installation
============
@@ -46,6 +46,7 @@ If you want to localize it:
```JavaScript
var strftime = require('strftime') // not required in browsers
var it_IT = {
identifier: 'it-IT',
days: ['domenica', 'lunedi', 'martedi', 'mercoledi', 'giovedi', 'venerdi', 'sabato'],
shortDays: ['dom', 'lun', 'mar', 'mer', 'gio', 'ven', 'sab'],
months: ['gennaio', 'febbraio', 'marzo', 'aprile', 'maggio', 'giugno', 'luglio', 'agosto', 'settembre', 'ottobre', 'novembre', 'dicembre'],
@@ -147,7 +148,7 @@ e.g. `%q` becomes `q`. Use `%%` to get a literal `%` sign.
- X: equivalent to `%T` or `%r` in en_US (based on locale)
- x: equivalent to `%D` in en_US (based on locale)
- Y: the year with the century
- y: the year without the century (00-99)
- y: the year without the century, padded to 2 digits (00-99)
- Z: the time zone name, replaced with an empty string if it is not found
- z: the time zone offset from UTC, with a leading plus sign for UTC and zones east
of UTC and a minus sign for those west of UTC, hours and minutes follow each
@@ -179,28 +180,30 @@ Contributors
* [Alexandr Nikitin](https://github.com/alexandrnikitin)
* [Andrew Pirondini](https://github.com/andrewjpiro) of [iFixit](https://github.com/iFixit)
* [Andrew Schaaf](https://github.com/andrewschaaf)
* [Aryan Arora](https://github.com/aryan-debug)
* [Ayman Nedjmeddine](https://github.com/IOAyman)
* [Cory Heslip](https://github.com/cheslip)
* [Douglas de Espindola](https://github.com/douglasep)
* [Forbes Lindesay](https://github.com/ForbesLindesay)
* [John Zwinck](https://github.com/jzwinck)
* [Joost Hietbrink](https://github.com/joost)
* [Kevin Jin](https://github.com/Kevin-Jin)
* [Maximilian Herold](https://github.com/mherold)
* [Michael J.](https://github.com/michaeljayt)
* [@mogando668](https://github.com/mogando668)
* [Peter deHaan](https://github.com/pdehaan)
* [Rob Colburn](https://github.com/robcolburn)
* [Ryan Regalado](https://github.com/d48)
* [Ryan Stafford](https://github.com/ryanstafford)
* [Sami Samhuri](https://github.com/samsonjs)
* [Stian Grytøyr](https://github.com/stiang)
* [TJ Holowaychuk](https://github.com/tj)
* [w0den](https://github.com/w0den)

* [@w0den](https://github.com/w0den)
* [Yusuke Kawasaki](https://github.com/kawanet)

License
=======

Copyright 2010 - 2021 Sami Samhuri sami@samhuri.net
Copyright 2010 - 2024 Sami Samhuri sami@samhuri.net

[MIT license](https://sjs.mit-license.org)

2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "strftime",
"version": "0.10.1",
"version": "0.10.3",
"main": "strftime.js",
"ignore": [
"Readme.md",
15 changes: 11 additions & 4 deletions component.json
Original file line number Diff line number Diff line change
@@ -2,8 +2,15 @@
"name": "strftime",
"repo": "samsonjs/strftime",
"description": "strftime date formatting",
"keywords": ["strftime", "format", "date", "time"],
"version": "0.10.1",
"keywords": [
"strftime",
"format",
"date",
"time"
],
"version": "0.10.3",
"main": "strftime.js",
"scripts": ["strftime.js"]
}
"scripts": [
"strftime.js"
]
}
17 changes: 17 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 12 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "strftime",
"description": "strftime for JavaScript",
"version": "0.10.1",
"version": "0.10.3",
"homepage": "https://samhuri.net/projects/strftime",
"author": "Sami Samhuri <sami@samhuri.net>",
"contributors": [
@@ -23,9 +23,17 @@
"Sami Samhuri <sami@samhuri.net> (https://github.com/samsonjs)",
"Stian Grytøyr (https://github.com/stiang)",
"TJ Holowaychuk (https://github.com/tj)",
"w0den (https://github.com/w0den)"
"w0den (https://github.com/w0den)",
"Yusuke Kawasaki (https://github.com/kawanet)",
"Aryan Arora (https://github.com/aryan-debug)"
],
"keywords": [
"strftime",
"format",
"string",
"time",
"date"
],
"keywords": ["strftime", "format", "string", "time", "date"],
"repository": {
"type": "git",
"url": "git://github.com/samsonjs/strftime.git"
@@ -42,4 +50,4 @@
"dependencies": {},
"devDependencies": {},
"optionalDependencies": {}
}
}
Loading