org.jrobin.core.timespec

Class TimeParser

public class TimeParser extends Object

Class which parses at-style time specification (describided in detail on the rrdfetch man page), used in all RRDTool commands. This code is in most parts just a java port of Tobi's parsetime.c code.
Constructor Summary
TimeParser(String dateString)
Constructs TimeParser instance from the given input string.
Method Summary
TimeSpecparse()
Parses the input string specified in the constructor.

Constructor Detail

TimeParser

public TimeParser(String dateString)
Constructs TimeParser instance from the given input string.

Parameters: dateString at-style time specification (read rrdfetch man page for the complete explanation)

Method Detail

parse

public TimeSpec parse()
Parses the input string specified in the constructor.

Returns: Object representing parsed date/time.

Throws: RrdException Thrown if the date string cannot be parsed.