Group: | Handling of time |
Topic: | Time as numerical output |
See also: | nmonth ndayofmonth ndayofweek nhour nminute nsecond |
Function: | nyear | |
Description: | returns the year as a four digit number (YYYY) |
Usage: | tn = nyear(t) | |
Input: | ||
t | n x 1 time vector | |
Output: | ||
tn | n x 1 array |
yr = 1970 +(1:10) t = settime(yr) tn = nyear(t) tn
Contents of tn [ 1,] 1971 [ 2,] 1972 [ 3,] 1973 [ 4,] 1974 [ 5,] 1975 [ 6,] 1976 [ 7,] 1977 [ 8,] 1978 [ 9,] 1979 [10,] 1980