dateToNumber: Difference between revisions
Lou Montana (talk | contribs) m (Text replacement - " \| arma2  \| *([0-9]\.[0-9]{2}) * " to " | arma2 |$1  |game2= arma2oa |version2= 1.50  |game3= tkoh |version3= 1.00  |game4= arma3 |version4= 0.50 ")  | 
				Lou Montana (talk | contribs)  m (Text replacement - "\|( *\[\[[a-zA-Z]+\]\]) *  \|x1=" to "\|r1=$1  \|x1=")  | 
				||
| Line 26: | Line 26: | ||
|p1= date: [[Array]] - array in [[date]] format  | |p1= date: [[Array]] - array in [[date]] format  | ||
| [[Number]]  | \|r1= [[Number]]  | ||
|x1= <code>_float = [[dateToNumber]] [2035,7,6,12,0]; //0.510959</code>  | \|x1= <code>_float = [[dateToNumber]] [2035,7,6,12,0]; //0.510959</code>  | ||
|x2= <code>[[dateToNumber]] [[date]]; //will return float number for the current date.</code>  | |x2= <code>[[dateToNumber]] [[date]]; //will return float number for the current date.</code>  | ||
Revision as of 10:24, 10 June 2021
Description
- Description:
 - Description needed
 - Groups:
 - Environment
 
Syntax
- Syntax:
 - Syntax needed
 - Parameters:
 - date: Array - array in date format \
 - 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.- Example 3:
 - Calculate days from 1/1/1970: 
fnc_daysFromEpoc = { private _year = param [0]; private _days = 0; for "_i" from 1970 to _year - 1 do { _days = _days + round linearConversion [0, 1, dateToNumber [_i, 12, 31, 23, 59], 0, 365, false]; }; _days + linearConversion [0, 1, dateToNumber _this, 0, 365, false]; }; hint str (date call fnc_daysFromEpoc); 
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