Jpp
17.3.1
the software that should make you happy
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
examples
JSystem
JDate.cc
Go to the documentation of this file.
1
#include <string>
2
#include <iostream>
3
#include <iomanip>
4
5
#include "
JSystem/JDate.hh
"
6
#include "
Jeep/JParser.hh
"
7
#include "
Jeep/JMessage.hh
"
8
#include "
Jeep/JPrint.hh
"
9
10
11
/**
12
* \file
13
*
14
* Example program to show system time.
15
* \author mdejong
16
*/
17
int
main
(
int
argc,
char
* argv[])
18
{
19
using namespace
std;
20
using namespace
JPP;
21
22
try
{
23
24
JParser<>
zap(
"Example program to show system time."
);
25
26
zap(argc, argv);
27
}
28
catch
(
const
exception &error) {
29
FATAL
(error.what() << endl);
30
}
31
32
33
cout <<
getDate
() << endl;
34
cout <<
getTime
() << endl;
35
cout <<
getDateAndTime
().
toString
() << endl;
36
37
JDateAndTime cal;
38
39
cout << cal.getYear() <<
'/'
<<
FILL
(2,
'0'
) << cal.getMonth() <<
'/'
<<
FILL
(2,
'0'
) << cal.getDay() << endl;
40
}
JPARSER::JParser
Utility class to parse command line options.
Definition:
JParser.hh:1517
main
int main(int argc, char *argv[])
Definition:
Main.cc:15
JSYSTEM::JDateAndTime::toString
std::string toString() const
Get ASCII formatted date and time.
Definition:
JSystem/JDate.hh:267
JAANET::getTime
double getTime(const Hit &hit)
Get true time of hit.
Definition:
JAAnetToolkit.hh:93
JDate.hh
Date and time functions.
JSYSTEM::getDateAndTime
static JDateAndTime getDateAndTime
Function object to get current date and time.
Definition:
JSystem/JDate.hh:398
JPrint.hh
I/O formatting auxiliaries.
JMessage.hh
General purpose messaging.
FILL
Auxiliary data structure for sequence of same character.
Definition:
JManip.hh:328
FATAL
#define FATAL(A)
Definition:
JMessage.hh:67
JSYSTEM::getDate
const char * getDate()
Get current date conform ISO-8601 standard.
Definition:
JSystem/JDate.hh:33
JParser.hh
Utility class to parse command line options.
Generated by
1.8.5