Year: Difference between revisions
Jump to navigation
Jump to search
(5 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
''This function is for BASIC compatibility. It is not available in pure JavaScript projects.'' | |||
Year(''date'') | Year(''date'') | ||
Line 16: | Line 18: | ||
Birthyear = Year("12/27/70") | Birthyear = Year("12/27/70") | ||
Print "YEAR of 12/27/70:", Birthyear | Print "YEAR of 12/27/70:", Birthyear | ||
</pre> | </pre> | ||
Line 44: | Line 34: | ||
[[Category:Date and Time]] | [[Category:Date and Time]] | ||
[[Category:BASIC Functions]] |
Latest revision as of 15:40, 25 March 2019
This function is for BASIC compatibility. It is not available in pure JavaScript projects.
Year(date)
Description
Year returns an integer, that represents the year of the given date.The required parameter, date, can be any expression that represents a date.
Example (Basic)
Rem Year Example 'Year returns year of a date as an integer Dim IndepYear, Birthyear IndepYear = Year("July 4, 1776") Print "YEAR of July 4, 1776:", IndepYear Birthyear = Year("12/27/70") Print "YEAR of 12/27/70:", Birthyear
Output
YEAR of July 4, 1776: 1776 YEAR of 12/27/70: 1970