dateunix

버전 1.2.2.2 (3.71 KB) 작성자: Marc Jakobi
Class for time stamps in the UNIX format
다운로드 수: 53
업데이트 날짜: 2016/10/14

라이선스 보기

DATEUNIX Class for time stamps in the UNIX format (number of seconds
since 01-Jan-1970)

The constructor method can be used to convert datenum, datevec,
datestr and datetime by calling:

dout = dateunix(din)
dout = dateunix(din, formatOut)

It can also be converted to the 4 aforementioned formats by calling
their respective functions on a variable of type dateunix.


Methods:

- Add/subtract time to a dateunix variable:

newtime = addtime(oldtime, increment);

increment can be 'nanoseconds', 'microseconds', 'milliseconds',
'seconds', 'minutes' or the default: 'days'

- Determine day of the year (value between 1 and 366)

doy = dayofyear(time);

- Determine day of the week (value between 1 and 7)

dow = dayofweek(time, start);
--> start is a string that determines the first day of the week
can be 'Sun' (default), 'Mon', 'Tue', 'Wed', 'Thu', 'Fri',
or 'Sat'

- Determine time of the day in 'nanoseconds', 'microseconds', 'milliseconds',
'seconds' (default), 'minutes' or 'days' (set by input: increment)

tod = timeofday(time, increment);

Methods will be gradually added/updated if they are needed.


Author: Marc Jakobi, 05.10.2016

인용 양식

Marc Jakobi (2024). dateunix (https://www.mathworks.com/matlabcentral/fileexchange/59487-dateunix), MATLAB Central File Exchange. 검색 날짜: .

MATLAB 릴리스 호환 정보
개발 환경: R2016b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Dates and Time에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
1.2.2.2

file didn't update again.

1.2.2.1

file didn't update.

1.2.2.0

Updated with overloaded operators.
Performing operations on a dateunix object now returns a new dateunix object.
uminus() returns a double.
horzcat, vertcat, etc. now implemented.

1.2.1.0

Updated timeofday method with performance improvements suggested by Jan Simon

1.2.0.0

- forgot to change the file

1.1.0.0

- Added three new methods: dayofyear(), dayofweek() and timeofday()
- Added method for datevec() function
- corrected mistake in addtime() method
- corrected mistake in local function cellstrfind()

1.0.0.0