question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Constructor with custom format

See original GitHub issue

moment.js has wide usable feature to make date from custom strings. For example: moment('2018-02-01', 'YYYY-DD-MM') or moment('02-2018-01', 'DD-YYYY-MM');

Do we want to support this feature in our core? I’m not sure how to implement it in minimalist way, but I think we need to rewrite .format function somehow to avoid copy-paste of code. If you will be agree, guys, that we need to have this feature - I’ll think about it.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:11
  • Comments:13 (6 by maintainers)

github_iconTop GitHub Comments

7reactions
pablomaurercommented, May 12, 2018

@iamkun Yep using ISO would format is a great advice, but some (me 😄) have to deal with data from other sources which doesn’t support the ISO date format.

6reactions
atomfredecommented, Jul 6, 2018

@iamkun ✔️ I will try to build one.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Providing Constructors for Your Classes (The Java™ Tutorials ...
A class contains constructors that are invoked to create objects from the class blueprint. Constructor declarations look like method declarations—except ...
Read more >
java - Throwable constructor with message format parameters
I believe a constructor like that would allow a much more clean and elegant exception handling. throw new Exception(String.format("Illegal value ...
Read more >
Guide to Android custom views: constructors | by Marcin Korniluk
Each Android view has up to 4 constructors. In the simple scenario, you usually need only the first two. ... This is the...
Read more >
Constructors in Java - GeeksforGeeks
In Java, a constructor is a block of codes similar to the method. It is called when an instance of the class is...
Read more >
Constructors (C++) | Microsoft Learn
To customize how a class initializes its members, or to invoke functions when an object of your class is created, define a constructor....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found