Convert time stamp observed in YEAR-MONTH-DAY format for Dart polymer

What the title says. I invoke the cloud endpoint, which records the filing time of the record as a Java date. When I call this endpoint for the recording form, it returns it to the Dart as a timestamp that I linked through the polymer to the template.

However, the Java date is hardly readable by non-programmers, and I need a way to turn this into a polymer into something that looks decent. Any suggestions?

thanks

Ruben

+4
source share
2 answers

You can use the DateFormat class from intl package .

+3

java.util.date Dart. , , Dart DateTime. , DateTime Dart java.util.date :

var timestamp = "StringRepresentationOfJava.Util.Date".split('.')[0];

DateTime, Dart DateFormat.

Polymer Expressions. , , .

+1

All Articles