[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Generic date parser ?
From: |
CdeMills |
Subject: |
Generic date parser ? |
Date: |
Tue, 27 Mar 2012 01:34:58 -0700 (PDT) |
Hello,
There are so many ways to indicate a date... I was thinking about writing a
function
[timeval, nfields] = parsedate(X, Y)
where
- X is either a string, either a cellstr
- Y is a structure with fields
- 'trigger' : a specific char wich leads to think it's a date (typically
':', '-')
- 'format' : a string to pass to strptime
- 'nfields' : ignored if X is a string. The number of consecutive fields
to concatenate if X is a cellstr
- timeval is either a struct, either a cell array of struct
- nfields is a scalar or a vector
The idea is to build a generic interface above strptime, with the ability to
cope with whatever date format the user has to cope with. Could it be added
to octave core functions ?
Regards
Pascal
--
View this message in context:
http://octave.1599824.n4.nabble.com/Generic-date-parser-tp4508237p4508237.html
Sent from the Octave - General mailing list archive at Nabble.com.
- Generic date parser ?,
CdeMills <=