bugGNU Octave - Bugs: bug #54679, datenum accepts a matrix, which is...

 
 

bug #54679: datenum accepts a matrix, which is undocumented

Submitter:  None
Submitted:  Tue 18 Sep 2018 01:54:58 PM UTC
 
Category:  Documentation Severity:  2 - Minor
Priority:  3 - Low Item Group:  Documentation
Status:  Patch Submitted Assigned to:  None
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  * Open Release:  * dev
Operating System:  * Any
* Mandatory Fields

Add a New Comment (Rich Markup)
   

Comment Type & Canned Response:
       

 

Tue 23 Nov 2021 01:31:34 AM UTC, comment #4: 

patch didn't push clean to current default tip.  updated the patch, moved the examples into the body of the docstring, and updated the texinfo around the examples. also simplified the last array example so the result was a bit cleaner.

as a simple documentation patch, this looks like it should be good to go.

(file #52326)

Nicholas Jankowski <nrjank>
Project Member
Fri 30 Jul 2021 03:37:18 AM UTC, comment #3: 

Can Andrew's patch be implemented?
The patch also provides examples, which is of benefit.

Anonymous
Sat 19 Jan 2019 06:21:59 AM UTC, comment #2: 

Here's a patch to add doco about datenum's nonscalar inputs: file #46024.

Andrew Janke <apjanke>
Tue 18 Sep 2018 08:18:28 PM UTC, comment #1: 

Thanks for this report.
Can you come up with patch or changeset, please? Documentation patches are really easy. Just edit the function, save it to another name and then do:

diff -u <original_function_file> <improved_function_file> > <some_file_name>.patch

A mercurial changeset would be really awesome.

Philip Nienhuis <philipnienhuis>
Project Member
Tue 18 Sep 2018 01:54:58 PM UTC, original submission:  

datenum() accepts not only single values, but also a matrix of values to convert as an argument. This capability is undocumented.

The manual should state that all arguments to the function: YEAR, MONTH, DAY, HOUR, MINUTE, SECOND can be either numbers or arrays, and the result will correspondently be a number or an array:

octave> datenum(2018,9,7)
ans =  737310
octave> datenum(2018,9,[7 6])
ans =
   737310   737309

This is also true of the DATEVEC argument:

octave> datenum(datevec(datenum(2018,9,7)))
ans =  737310
octave> datenum([datevec(datenum(2018,9,7)); datevec(datenum(2018,9,6))])
ans =
   737310
   737309

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by nrjank (Updated the item)
  • -email is unavailable- added by apjanke (Updated the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only project members can vote.

     

     

     

     

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-11-23 nrjank Attached File- Added octave-datenum-doco-for-nonscalar-inputs_v2.patch, #52326
        Release4.4.1 dev
        Operating SystemGNU/Linux Any
    2021-11-11 nrjank StatusNone Patch Submitted
    2019-01-19 apjanke Attached File- Added octave-datenum-doco-for-nonscalar-inputs.patch, #46024
    2018-09-19 mtmiller Severity3 - Normal 2 - Minor
        Priority5 - Normal 3 - Low

    Back to the top


    Powered by Savane 3.9