Class IntentDates

java.lang.Object
com.codename1.intents.IntentDates

public final class IntentDates extends Object

The one definition of what counts as a moment in time.

This grammar used to exist only inside the generated coercion, and the framework's own "could this value run?" check had to answer optimistically because of it -- so a donation carrying "not-a-date", or 1.5 where epoch milliseconds belong, was published as a durable shortcut that the coercion then rejected on every replay. Writing a second parser to close that would have been worse: two grammars drifting apart is a harder bug than the one it fixes. So there is one, here, and the generated code calls it.

Accepts a Date, epoch milliseconds as an integral number or a numeric string, or ISO-8601. All three arrive in practice: the platforms send milliseconds, and a language model handed this parameter through Intents#asTools writes a date the way it writes dates.

  • Method Details

    • parse

      public static Date parse(Object o)

      The moment this value names, or null when it names none.

      Null rather than an exception because both callers want to decide for themselves what an unusable value means: dispatch rejects the invocation naming the parameter, while the donation check refuses to publish a shortcut that could never run.