DateTimeEdit.getCurrentDay

Syntax

getCurrentDay();

Description

The getCurrentDay method returns the day value.

Example

To execute the example, add links to the PP.js library and to the PP.css visual styles table. Create the DateTimeEdit component, values of which are the current date and time.

<script type="text/javascript">

DTE = new PP.Ui.DateTimeEdit({//Create an instance of the DateTimeEdit component.

    ParentNode: document.getElementById("DTE1"),

    Width: 150,})

console.log(Day: + DTE.getCurrentDay() +//The current day value is returned;

", " + week: + DTE.getCurrentWeek() +//the current week value;

", " + month: + DTE.getCurrentMonth() +//the current month value;

", " + quarter: + DTE.getCurrentQuarter() +//the current quarter value;

", " + half year: + DTE.getCurrentHalfYear() +//the current value of half year;

", " + year: + DTE.getCurrentYear() +//the current value of the year;

", " + hour: + DTE.getCurrentHour() +//the current value of hour;

", " + minute: + DTE.getCurrentMinute())//the current value of minute.

</script>

After executing the example the values of the current time and date are displayed to the browser web console:

Day: 30, week: 34, month: 7, quarter: 2, half year: 1, year: 2011, hour: 9, minute: 55

NOTE. The month value is set and returned in the range from null to eleven.

See also:

DateTimeEdit