Lethaly Guy
Lethaly Guy

Reputation: 11

Codenameone get time

Is there a method in codename one for getting the system's time? Like, what hour it is in the device. Also, I'd like to get the day of the week. Because I want to make a program that constantly runs a clock, and it compares int variables with the current hour, and string variables with the week day. Is there a way to do it? I'm pretty new in programming languages.

Upvotes: 0

Views: 626

Answers (1)

Shai Almog
Shai Almog

Reputation: 52760

System.currentTimeMillis() will return the time. Date, TimeZone and java.util.Calendar are all available just like in standard Java.

Upvotes: 1

Related Questions