Skip to content
This repository has been archived by the owner on Jan 26, 2020. It is now read-only.

New date formattig algorithm #176

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

New date formattig algorithm #176

wants to merge 2 commits into from

Conversation

stswoon
Copy link

@stswoon stswoon commented Dec 25, 2015

Add ability to format date like in Java

  1. date literals z, Z, X
  2. escaping
  3. strict mode for non date literals outside escape block
    By default new formatting is disabled to save compatibility.
    To enable it call timezoneJS.timezone.init({newFormatting:{enabled:true}})

1) date literals z, Z, X
2) escaping
3) strict mode for non date literals outside escape block
By default new formatting is disabled to save compatibility.
To enable it call timezoneJS.timezone.init({newFormatting:{enabled:true}})
@stswoon
Copy link
Author

stswoon commented Dec 25, 2015

Hello MDE.

Thank you for your timezone-js project. You has done a great job. Your product helped me in my projects.
Unfortunaly I noticed that tzDate have a little issue with formatting and parsing date, e.g. it can't format date with +XX:XX, also it can't escape symbols. Formatting was critical for my project so I done it around your code (proxy function). Now I decided to improve your project (of course if you allow me to do it). I tried to do formatting like in Java as much closer as I can. But there are some assumtions because of data in Olson time zone files. All assumptions you can find in comments in code. For more information you also can see https://github.com/stswoon/tz. There is my experiments with js and java code.

I hope my improvement will be usefull for you.
Best Regards, Anatoly Nekhozhin.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant