Search Flex Samples

FLEX Basics of dates and times

Introduction to working with dates and times

Dates and times are a common type of information used in ActionScript programs. For instance, you might need to know the current day of the week or to measure how much time a user spends on a particular screen, among many other possibilities. In ActionScript, you can use the Date class to represent a single moment in time, including date and time information. Within a Date instance are values for the individual date and time units, including year, month, date, day of the week, hour, minutes, seconds, milliseconds, and time zone. For more advanced uses, ActionScript also includes the Timer class, which you can use to perform actions after a certain delay or at repeated intervals.

Common date and time tasks

This chapter describes the following common tasks for working with date and time information:

  • Working with Date objects
  • Getting the current date and time
  • Accessing individual date and time units (days, years, hours, minutes, and so on)
  • Performing arithmetic with dates and times
  • Converting between time zones
  • Performing repeating actions
  • Performing actions after a set time interval

Important concepts and terms

The following reference list contains important terms that you will encounter in this chapter:

  • UTC time: Coordinated Universal Time--the "zero hour" reference time zone. All other time zones are defined as a number of hours relative to (ahead of or behind) UTC time.

0 comments:

Related Flex Samples

Learn Flex: Flex Samples | Flex Video Tutorials Flex Examples