Clock

  • Description

      Clock

      TheClock is a non visible component provides the instant in time using the internal clock of the phone. You can fire a timer at set intervals regularly and perform calculations of time, manipulations, and conversions. the
      Also has methods to convert an instant to text, to see all of the possible formats, see the official documentation .

      The patterns are acceptable:

      • Empty string: this sets the value of default format.
      • Default format for date Format: MM / dd / YYYY HH: mm: ss a.
      • Default format for date and time Format: MMM d, yyyy HH:mm.

      The date and time are formatted with Instants and Durations:

      • Instant:consists of year, month, day of month, hour, minute, and second. It you can create an instant using the proceidmiento 'Create a instant'.
      • Duration: Es the time in milliseconds elapsed between instants. The length can be get by the procedure 'Duration'.
  • Events

    • Timer
    • Event that runs when the timer has finished.
  • Procedures

    • Add days
    • This method returns the instant you entered, with the days of more introduced in the argument.
    • Add weeks
    • This method returns the instant introduced by the weeks of more introduced in the argument.
    • Add months
    • This method returns the instant introduced with the months of more introduced in the argument.
    • Add years
    • This method returns the instant introduced with the years of more introduced in the argument.
    • Add duration
    • This method returns the instant you entered with the duration of more introduced in the argument. To get the duration we can use the procedure 'Duration'
    • Add hours
    • This method returns the instant introduced with the hours of more introduced in the argument.
    • Add minutes
    • This method returns the instant you entered with the minutes of the more introduced in the argument.
    • Add seconds
    • This method returns the instant you entered with the seconds of more introduced in the argument.
    • Day of month
    • This method returns the day of month (1-31) of the instant provided.
    • Duration
    • This method returns the duration, in milliseconds, elapsed between the instants provided.
    • Duration To Seconds
    • This method returns the duration, entered in seconds.
    • Duration To Minutes
    • This method returns the duration is entered in minutes.
    • Duration To Hours
    • This method returns the duration, entered in hours.
    • Duration To Days
    • This method returns the duration entered in days.
    • Duration To Weeks
    • This method returns the duration entered in weeks.
    • Format Date
    • This method returns a text-formatted date, the date of the instant specified.
    • Format Date Time
    • This method, returns a text with date and time format, the date of the instant specified.
    • Format Time
    • This method, returns a text with time format, the hour of the moment specified.
    • Get Millis
    • This method returns the instant in time measured in milliseconds since the 1970's.
    • Hour
    • This method returns the hour of day (0-23) of the time instant specified.
    • Minute
    • This method returns the minute of the hour (0-59) of the time instant specified.
    • Second
    • This method returns the second of the minute (0-59) of the time instant specified.
    • Weekday
    • This method returns the day of the week represented as a number from 1 (Sunday) to 7 (Saturday).
    • Weekday Name
    • This method returns the name of the week day of the instant specified.
    • Month
    • This method returns the month of year (1-12) of the instant specified.
    • Month Name
    • This method returns the name of the month of the instant specified. For example: January, February, March ...
    • Year
    • This method returns the year of the instant specified.
    • Make Instant
    • This method, returns an instant is specified by MM/dd/AAAA hh:mm:ss or MM/dd/YYYY or hh:mm. An example of input text would be "22/06/2015 12:18".
    • Make Instant From Millis
    • This method, returns an instant in time measured in milliseconds since 1970.
    • Now
    • This method returns the instant of the current time read from the clock of the phone.
    • System Hour
    • This method, returns the internal time of the phone.
  • Properties

    • Timer Always Fires (boolean)
    • If this property is set to 'True' enables the timer will fire even if the app is not in foreground.
    • Timer Enabled (boolean)
    • If this property is set to 'True' triggers the timer.
    • Timer Interval (number)
    • This property allows you to set or get the interval between timer events in milliseconds.
  • Example

    • Getting current time
    • When you press on the button you will get the current date and will be applied to the chosen format, in this case date and time. This text will be on a label that will be visible to the user.