libsim Versione 8.0.0
Riferimenti per il modulo datetime_class

Classi per la gestione delle coordinate temporali. Continua...

Tipi di dato

type  datetime
 Class for expressing an absolute time value. Continua...
type  timedelta
 Class for expressing a relative time interval. Continua...
type  cyclicdatetime
 Class for expressing a cyclic datetime. Continua...
interface  init
 Costruttori per le classi datetime e timedelta. Continua...
interface  delete
 Distruttori per le 2 classi. Continua...
interface  getval
 Restituiscono il valore dell'oggetto nella forma desiderata. Continua...
interface  to_char
 Restituiscono il valore dell'oggetto in forma di stringa stampabile. Continua...
interface  t2c
 Functions that return a trimmed CHARACTER representation of the input variable. Continua...
interface  operator(==)
 Operatore logico di uguaglianza tra oggetti della stessa classe. Continua...
interface  operator(/=)
 Operatore logico di disuguaglianza tra oggetti della stessa classe. Continua...
interface  operator(>)
 Operatore logico maggiore tra oggetti della stessa classe. Continua...
interface  operator(<)
 Operatore logico minore tra oggetti della stessa classe. Continua...
interface  operator(>=)
 Operatore logico maggiore-uguale tra oggetti della stessa classe. Continua...
interface  operator(<=)
 Operatore logico minore-uguale tra oggetti della stessa classe. Continua...
interface  operator(+)
 Operatore di somma per datetime e timedelta. Continua...
interface  operator(-)
 Operatore di sottrazione per datetime e timedelta. Continua...
interface  operator(*)
 Operatore di moltiplicazione di timedelta per uno scalare. Continua...
interface  operator(/)
 Operatore di divisione di timedelta. Continua...
interface  mod
 Operatore di resto della divisione. Continua...
interface  abs
 Operatore di valore assoluto di un intervallo. Continua...
interface  read_unit
 Legge un oggetto datetime/timedelta o un vettore di oggetti datetime/timedelta da un file FORMATTED o UNFORMATTED. Continua...
interface  write_unit
 Scrive un oggetto datetime/timedelta o un vettore di oggetti datetime/timedelta su un file FORMATTED o UNFORMATTED. Continua...
interface  display
 Print object. Continua...
interface  c_e
 Missing check. Continua...
interface  index
 Index method. Continua...
interface  index_sorted
 Index method with sorted array. Continua...
interface  sort
 Sort method. Continua...
type  arrayof_datetime
 Derived type defining a dynamically extensible array of TYPE(datetime) elements. Continua...
interface  insert
 Method for inserting elements of the array at a desired position. Continua...
interface  append
 Quick method to append an element to the array. Continua...
interface  remove
 Method for removing elements of the array at a desired position. Continua...
interface  packarray
 Method for packing the array object reducing at a minimum the memory occupation, without destroying its contents. Continua...

Funzioni/Subroutine

elemental type(datetime) function, public datetime_new (year, month, day, hour, minute, msec, unixtime, isodate, simpledate)
 Initialize a datetime object according to the provided arguments If no arguments are passed a missing object is created.
type(datetime) function, public datetime_new_now (now)
 Initialize a datetime object with the current system time.
subroutine datetime_init (this, year, month, day, hour, minute, msec, unixtime, isodate, simpledate, now)
 Costruisce un oggetto datetime con i parametri opzionali forniti.
pure subroutine datetime_getval (this, year, month, day, hour, minute, msec, unixtime, isodate, simpledate, oraclesimdate)
 Restituisce il valore di un oggetto datetime in una o pi� modalit� desiderate.
elemental character(len=23) function datetime_to_char (this)
 Restituisce una rappresentazione carattere stampabile di un oggetto datetime.
subroutine datetime_read_unit (this, unit)
 This method reads from a Fortran file unit the contents of the object this.
subroutine datetime_vect_read_unit (this, unit)
 This method reads from a Fortran file unit the contents of the object this.
subroutine datetime_write_unit (this, unit)
 This method writes on a Fortran file unit the contents of the object this.
subroutine datetime_vect_write_unit (this, unit)
 This method writes on a Fortran file unit the contents of the object this.
subroutine, private arrayof_datetime_insert_array (this, content, nelem, pos)
 Method for inserting a number of elements of the array at a desired position.
subroutine, private arrayof_datetime_insert (this, content, pos)
 Method for inserting an element of the array at a desired position.
integer function, private arrayof_datetime_append (this, content)
 Quick method to append an element to the array.
subroutine, private arrayof_datetime_insert_unique (this, content, pos)
 Method for inserting an element of the array at a desired position only if it is not present in the array yet.
integer function, private arrayof_datetime_append_unique (this, content)
 Quick function to append an element to the array only if it is not present in the array yet.
subroutine, private arrayof_datetime_remove (this, nelem, pos)
 Method for removing elements of the array at a desired position.
subroutine, private arrayof_datetime_delete (this, nodealloc)
 Destructor for finalizing an array object.
subroutine, private arrayof_datetime_packarray (this)
 Method for packing the array object reducing at a minimum the memory occupation, without destroying its contents.
type(timedelta) function, public timedelta_new (year, month, day, hour, minute, sec, msec, isodate, simpledate, oraclesimdate)
 Costruisce un oggetto timedelta con i parametri opzionali forniti.
subroutine timedelta_init (this, year, month, day, hour, minute, sec, msec, isodate, simpledate, oraclesimdate)
 Costruisce un oggetto timedelta con i parametri opzionali forniti.
pure subroutine timedelta_getval (this, year, month, amonth, day, hour, minute, sec, msec, ahour, aminute, asec, amsec, isodate, simpledate, oraclesimdate)
 Restituisce il valore di un oggetto timedelta in una o pi� modalit� desiderate.
elemental character(len=23) function timedelta_to_char (this)
 Restituisce una rappresentazione carattere stampabile di un oggetto timedelta.
elemental integer(kind=int_ll) function, public timedelta_getamsec (this)
 Restituisce il valore in millisecondi totali di un oggetto timedelta.
type(timedelta) function, public timedelta_depop (this)
 Depopularize a timedelta object.
subroutine timedelta_read_unit (this, unit)
 This method reads from a Fortran file unit the contents of the object this.
subroutine timedelta_vect_read_unit (this, unit)
 This method reads from a Fortran file unit the contents of the object this.
subroutine timedelta_write_unit (this, unit)
 This method writes on a Fortran file unit the contents of the object this.
subroutine timedelta_vect_write_unit (this, unit)
 This method writes on a Fortran file unit the contents of the object this.
type(cyclicdatetime) function, public cyclicdatetime_new (tendaysp, month, day, hour, minute, chardate)
 Costruisce un oggetto cyclicdatetime con i parametri opzionali forniti.
elemental character(len=80) function cyclicdatetime_to_char (this)
 Restituisce una rappresentazione carattere stampabile di un oggetto cyclicdatetime.
type(datetime) function, public cyclicdatetime_to_conventional (this)
 Restituisce una rappresentazione convenzionale in forma datetime cyclicdatetime.
integer function count_distinct_sorted_datetime (vect, mask)
 conta gli elementi distinti in un sorted array
integer function count_distinct_datetime (vect, mask, back)
 conta gli elementi distinti in vect
type(datetime) function, dimension(dim) pack_distinct_sorted_datetime (vect, dim, mask)
 compatta gli elementi distinti di vect in un sorted array
type(datetime) function, dimension(dim) pack_distinct_datetime (vect, dim, mask, back)
 compatta gli elementi distinti di vect in un array
integer function, dimension(size(vect)) map_distinct_datetime (vect, mask, back)
 map distinct
integer function, dimension(dim) map_inv_distinct_datetime (vect, dim, mask, back)
 map inv distinct
integer function index_datetime (vect, search, mask, back, cache)
 Cerca l'indice del primo o ultimo elemento di vect uguale a search.
recursive integer function index_sorted_datetime (vect, search)
 Cerca l'indice del primo o ultimo elemento di vect uguale a search.
subroutine sort_datetime (xdont)
 Sorts inline into ascending order - Quicksort Quicksort chooses a "pivot" in the set, and explores the array from both ends, looking for a value > pivot with the increasing index, for a value <= pivot with the decreasing index, and swapping them when it has found one of each.
subroutine inssor_datetime (xdont)
 Sorts into increasing order (Insertion sort) Sorts XDONT into increasing order (Insertion sort) This subroutine uses insertion sort.

Variabili

type(datetime), parameter, public datetime_miss =datetime(illmiss)
 valore mancante per datetime
type(timedelta), parameter, public timedelta_miss =timedelta(illmiss, 0)
 valore mancante per timedelta
type(timedelta), parameter, public timedelta_0 =timedelta(0, 0)
 intervallo timedelta di durata nulla
integer, parameter, public datetime_utc =1
 inizializza con l'ora UTC
integer, parameter, public datetime_local =2
 inizializza con l'ora locale
type(datetime), parameter, public datetime_min =datetime(-HUGE(1_int_ll)-1)
 Minimum valid value for datetime.
type(datetime), parameter, public datetime_max =datetime(HUGE(1_int_ll)-1)
 Minimum valid value for datetime.
type(timedelta), parameter, public timedelta_min =timedelta(-HUGE(1_int_ll)-1, 0)
 Minimum valid value for timedelta.
type(timedelta), parameter, public timedelta_max =timedelta(HUGE(1_int_ll)-1, 0)
 Minimum valid value for timedelta.
type(cyclicdatetime), parameter, public cyclicdatetime_miss =cyclicdatetime(imiss, imiss, imiss, imiss, imiss)
 missing value for cyclicdatetime

Descrizione dettagliata

Classi per la gestione delle coordinate temporali.

Questo module definisce un paio di classi per la gestione di date assolute e di intervalli temporali. Entrambe le classi hanno le componenti di tipo PRIVATE, per cui non possono essere manipolate direttamente ma solo tramite i relativi metodi. Attualmente la precisione massima consentita � di un minuto, mentre l'estensione delle date rappresentabili va dall'anno 1 all'anno 4074 d.C. circa, ipotizzando un calendario gregoriano per tutto il periodo. Questo fatto implica che le date precedenti all'introduzione del calendario gregoriano avranno discrepanze di uno o pi� giorni rispetto alle date storiche "vere", ammesso che qualcuno conosca queste ultime.


Generated with Doxygen.