Comments (4)
What would you expect parseFormat(1397418578)
to return? I’d suggest it should throw a better error message than format.replace
. Would happily accept a pull request for it, you can add a test case to https://github.com/gr2m/moment-parseformat/blob/master/test/moment-parseformat-test.js
from moment-parseformat.
Hi @gr2m ,
I expect that parseFormat(1397418578) will not crash the program and return the value X
- exactly like when you run parseFormat("1397418578").
parseFormat should be able to work with Numbers and Strings
from moment-parseformat.
I think we can add an input.toString()
there and then a check for the x
format. I don’t need that so I won’t work on it, but if you send a pull request with a test, I’d be happy to help get it merged
from moment-parseformat.
done via #64, released in https://github.com/gr2m/moment-parseformat/releases/tag/v2.2.0
from moment-parseformat.
Related Issues (20)
- Su_2016_Aug_3 → Su_YYYY_MMM_D HOT 9
- 2015 02 03 → YYYY DD D HOT 6
- package.json is missing version HOT 3
- today → today HOT 1
- An in-range update of semantic-release is breaking the build 🚨 HOT 2
- Incorrect Date Conversion in nodered, moment.js in javascript works fine. HOT 2
- An in-range update of semantic-release is breaking the build 🚨 HOT 2
- 2018/12/30 12:00 → YYYY/MM/DD H:mm; HOT 1
- The automated release is failing 🚨
- https://api.tookanapp.com/ → https://api.tookanapp.com/
- Month and year only formats identified as date and year formats HOT 1
- Beyond 3DP seconds causes incorrect format output HOT 5
- The automated release is failing 🚨 HOT 8
- An in-range update of semantic-release is breaking the build 🚨 HOT 1
- An in-range update of rimraf is breaking the build 🚨 HOT 1
- Obtain all possible formats HOT 3
- Suggestion to make 3.1.0 release a major version update 4.0.0 HOT 5
- 2021-11-29 → YYYY-MM-DD
- 2022年9月3日 凌晨1点 → YYYY年D月3日 凌晨1点
- 29-Feb-2024 → D-MMMZ HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from moment-parseformat.