TypeScript.NET icon indicating copy to clipboard operation
TypeScript.NET copied to clipboard

DateTime format

Open oleksandrmelnychenko opened this issue 8 years ago • 2 comments

Do we have possibilities to change date time format as 'dd-mmm-yyy' for example ?

oleksandrmelnychenko avatar Feb 11 '17 11:02 oleksandrmelnychenko

There is currently nothing built in yet that would facilitate 'formatting' like .NET has. :( That was a huge endeavor that I deferred. There are string formatting utilities added so you could:

supplant("{day}-{month}-{year}",myDateTime.calendar())

But that wouldn't do any digit manipulation nor would it convert to a localized naming convention for the months. :(

electricessence avatar Feb 11 '17 16:02 electricessence

There is also a .NET analog for Regex that allows for named matches and MatchEvaluators so that could also be used as a foundation.

electricessence avatar Feb 11 '17 16:02 electricessence