#include <string>
#include "defun.h"
#include "error.h"
#include "oct-map.h"
#include "oct-time.h"
#include "ov.h"
#include "ovl.h"
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 | |
|
static |
Definition at line 86 of file time.cc.
References octave::sys::base_tm::gmtoff(), octave::sys::base_tm::hour(), intfield(), octave::sys::base_tm::isdst(), octave::sys::base_tm::mday(), octave::sys::base_tm::min(), octave::sys::base_tm::mon(), octave::sys::base_tm::sec(), stringfield(), octave::sys::base_tm::usec(), octave::sys::base_tm::wday(), octave::sys::base_tm::yday(), octave::sys::base_tm::year(), and octave::sys::base_tm::zone().
OCTAVE_EXPORT octave_value_list Fstrptime | ( | const octave_value_list & | args, |
int | |||
) |
OCTAVE_EXPORT octave_value_list Ftime | ( | const octave_value_list & | args, |
int | |||
) |
for fields that display a single padding can be changed or inhibited by following the hour | ( | hh:mm:ss | M[AP] | ) |
Referenced by octave_rand::initialize_ranlib_generators().
|
inlinestatic |
Definition at line 60 of file time.cc.
References octave_scalar_map::getfield(), octave_value::isempty(), k, retval, and octave_value::xint_value().
Referenced by extract_tm().
|
static |
Definition at line 39 of file time.cc.
References octave_scalar_map::assign(), and t.
|
inlinestatic |
Definition at line 73 of file time.cc.
References octave_scalar_map::getfield(), octave_value::isempty(), k, retval, string, and octave_value::xstring_value().
Referenced by extract_tm().
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 |
Definition at line 115 of file time.cc.
Referenced by QUnixTerminalImpl::get_hotspot_actions(), QTerminal::handleCustomContextMenuRequested(), and isLineCharString().
Definition at line 441 of file time.cc.
Referenced by Emulation::receiveChar(), and Vt102Emulation::tau().
Definition at line 441 of file time.cc.
Referenced by octave::file_editor_tab::auto_margin_width(), octave::external_editor_interface::call_custom_editor(), KeyboardTranslator::Entry::escapedText(), octave::base_ve_model::header_data(), octave::vector_struct_model::header_data(), octave::jit_block::label(), and QConsolePrivate::updateConsoleSize().
OCTAVE_EXPORT octave_value_list the value returned by ode |