sarkistlt / graphql-auto-generating-cms

Use your existing graphQL schema to generate CMS in a couple steps. DEMO: http://cms-demo.web4fly.com/
380 stars 36 forks source link

Fix date format error for years < 1000 #5

Closed SergejKasper closed 7 years ago

SergejKasper commented 7 years ago

Years smaller than 1000 were lacking the leading zeros for the yyyy-MM-dd format (because they lacked the conditional zero-filling of the months and days) and thus were yielding errors in the CMS Entity-View. I believe the following solution is more flexible and short-hand than conditionally appending a fix number of zeros.

sarkistlt commented 7 years ago

looks good and more convenient, thanks!