GNU Octave  4.2.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions | Variables
time.cc File Reference
#include <string>
#include "defun.h"
#include "error.h"
#include "oct-map.h"
#include "oct-time.h"
#include "ov.h"
#include "ovl.h"
Include dependency graph for time.cc:

Go to the source code of this file.

Functions

static octave::sys::base_tm extract_tm (const octave_scalar_map &m, const char *who)
 
OCTAVE_EXPORT octave_value_list Fstrptime (const octave_value_list &args, int) ar
 
OCTAVE_EXPORT octave_value_list Ftime (const octave_value_list &args, int) on Monday February 17
 
for fields that display a
single padding can be changed
or inhibited by following the 
hour (hh:mm).tem%s Time in seconds since 00
 
for fields that display a
single padding can be changed
or inhibited by following the 
hour (hh:mm:ss[AP]M).tem%R Time
 
static int intfield (const octave_scalar_map &m, const std::string &k, const char *who)
 
static octave_scalar_map mk_tm_map (const octave::sys::base_tm &t)
 
static std::string stringfield (const octave_scalar_map &m, const std::string &k, const char *who)
 

Variables

for fields that display a
single padding can be changed
or inhibited by following the 
amp {%} with one of the modifiers described below. Unknown field specifiers are copied as normal characters. All other characters are copied to the output without change. For example: xample roup strftime ("%r (%Z) %A %e %B %Y", localtime (time ())) esult{} "01:15:06 AM (CST) Monday 17 February 1997" nd group nd example Octave's @code{strftime} function supports a superset of the ANSI C field specifiers. @noindent Literal character fields: @table @code @item %% % character. @item %n Newline character. @item %t Tab character. @end table @noindent Numeric modifiers (a nonstandard extension): @table @code @item - (dash) Do not pad the field. @item _ (underscore) Pad the field with spaces. @end table @noindent Time fields: @table @code @item %H Hour (00-23). @item %I Hour (01-12). @item %k Hour (0-23). @item %l Hour (1-12). @item %M Minute (00-59). @item %p Locale's AM or PM. tem %r Time
 
OCTAVE_EXPORT octave_value_list at
 
numeric fields are padded if
necessary Padding is with
zeros by 
default
 
for fields that display a single number
 
OCTAVE_EXPORT
octave_value_list the value
returned by 
ode
 
 otherwise =} strptime (ar{str}, ar{fmt}) Convert the string ar{str} to the time structure ar{tm_struct} under the control of the format string ar{fmt}. If ar{fmt} fails to match, ar{nchars} is 0
 

Function Documentation

static octave::sys::base_tm extract_tm ( const octave_scalar_map m,
const char *  who 
)
static
OCTAVE_EXPORT octave_value_list Fstrptime ( const octave_value_list args,
int   
)

Definition at line 478 of file time.cc.

Referenced by install_time_fcns().

OCTAVE_EXPORT octave_value_list Ftime ( const octave_value_list args,
int   
)

Referenced by install_time_fcns().

for fields that display a single padding can be changed or inhibited by following the hour ( hh:mm  )

Definition at line 441 of file time.cc.

for fields that display a single padding can be changed or inhibited by following the hour ( hh:mm:ss  M[AP])
static int intfield ( const octave_scalar_map m,
const std::string k,
const char *  who 
)
inlinestatic
static octave_scalar_map mk_tm_map ( const octave::sys::base_tm t)
static
static std::string stringfield ( const octave_scalar_map m,
const std::string k,
const char *  who 
)
inlinestatic

Variable Documentation

for fields that display a single padding can be changed or inhibited by following the amp {%} with one of the modifiers described below. Unknown field specifiers are copied as normal characters. All other characters are copied to the output without change. For example: xample roup strftime ("%r (%Z) %A %e %B %Y", localtime (time ())) esult{} "01:15:06 AM (CST) Monday 17 February 1997" nd group nd example Octave's @code{strftime} function supports a superset of the ANSI C field specifiers. @noindent Literal character fields: @table @code @item %% % character. @item %n Newline character. @item %t Tab character. @end table @noindent Numeric modifiers (a nonstandard extension): @table @code @item - (dash) Do not pad the field. @item _ (underscore) Pad the field with spaces. @end table @noindent Time fields: @table @code @item %H Hour (00-23). @item %I Hour (01-12). @item %k Hour (0-23). @item %l Hour (1-12). @item %M Minute (00-59). @item %p Locale's AM or PM. tem %r Time

Definition at line 441 of file time.cc.

OCTAVE_EXPORT octave_value_list at

Definition at line 115 of file time.cc.

Referenced by isLineCharString().

numeric fields are padded if necessary Padding is with zeros by default

Definition at line 441 of file time.cc.

for fields that display a single number

Definition at line 441 of file time.cc.

OCTAVE_EXPORT octave_value_list the value returned by ode

Definition at line 115 of file time.cc.

otherwise =} strptime (ar{str}, ar{fmt}) Convert the string ar{str} to the time structure ar{tm_struct} under the control of the format string ar{fmt}. If ar{fmt} fails to match, ar{nchars} is 0

Definition at line 478 of file time.cc.