Jpp
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
() << 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:1493
JAANET::getTime
double getTime(const Hit &hit)
Get true time of hit.
Definition:
JAAnetToolkit.hh:88
JDate.hh
Date and time functions.
JSYSTEM::getDateAndTime
static JDateAndTime getDateAndTime
Function object to get ASCII formatted date and time.
Definition:
JSystem/JDate.hh:195
JPrint.hh
I/O formatting auxiliaries.
JMessage.hh
General purpose messaging.
FILL
Auxiliary data structure for sequence of same character.
Definition:
JPrint.hh:361
FATAL
#define FATAL(A)
Definition:
JMessage.hh:67
JSYSTEM::getDate
const char * getDate()
Get ASCII formatted date.
Definition:
JSystem/JDate.hh:23
JParser.hh
Utility class to parse command line options.
JSYSTEM::JDateAndTime::getYear
int getYear() const
year a.d.
Definition:
JSystem/JDate.hh:96
main
int main(int argc, char *argv[])
Definition:
Main.cpp:15
Generated by
1.8.5