dateToNumber: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(Undo revision 87618 by Ozdeadmeat (talk) comment removed because "Only post proven facts here")
(leap behaviour)
Line 7: Line 7:
____________________________________________________________________________________________
____________________________________________________________________________________________


| Convert a date to a float number, based on Jan 1st 00:00:00 <nowiki>=</nowiki> 0 and Dec 31th 23:59:59 <nowiki>=</nowiki> 1 |= Description
| Convert a date to a float number, based on Jan 1st 00:00:00 <nowiki>=</nowiki> 0 and Dec 31st 23:59:59 <nowiki>=</nowiki> 1. The same day and time in leap year will be different after 28th of February and 23:59 on 31st of December will be 1.00274 |= Description
____________________________________________________________________________________________
____________________________________________________________________________________________



Revision as of 23:01, 4 February 2015

Hover & click on the images for description

Description

Description:
Convert a date to a float number, based on Jan 1st 00:00:00 = 0 and Dec 31st 23:59:59 = 1. The same day and time in leap year will be different after 28th of February and 23:59 on 31st of December will be 1.00274
Groups:
Uncategorised

Syntax

Syntax:
dateToNumber date
Parameters:
date: Array -
Return Value:
Number

Examples

Example 1:
_float = dateToNumber [2035,7,6,12,0]; //0.510959
Example 2:
dateToNumber date; //will return float number for the current date.

Additional Information

See also:
datedaytimetimenumberToDate

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note

Notes

Bottom Section