Friday, May 24, 2019

Javascript Locale Date Format

This is just a simple example :


var date = new Date();
undefined

date.toLocaleDateString("id")
"24/5/2019"
date.toLocaleDateString("ja")
"2019/5/24"
date.toLocaleDateString("en")
"5/24/2019"

No comments:

Post a Comment