ezvcard.io.scribe
Class VCardPropertyScribe.DateWriter

java.lang.Object
  extended by ezvcard.io.scribe.VCardPropertyScribe.DateWriter
Enclosing class:
VCardPropertyScribe<T extends VCardProperty>

protected static class VCardPropertyScribe.DateWriter
extends Object

Factory class for writing dates.


Constructor Summary
VCardPropertyScribe.DateWriter(Date date)
          Creates a new date writer object.
 
Method Summary
 VCardPropertyScribe.DateWriter extended(boolean extended)
          Sets whether to use extended format or basic.
 VCardPropertyScribe.DateWriter time(boolean hasTime)
          Sets whether to output the date's time component.
 VCardPropertyScribe.DateWriter utc(boolean utc)
          Sets whether to format the date in UTC time, or to include a UTC offset.
 String write()
          Creates the date string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VCardPropertyScribe.DateWriter

public VCardPropertyScribe.DateWriter(Date date)
Creates a new date writer object.

Parameters:
date - the date to format
Method Detail

time

public VCardPropertyScribe.DateWriter time(boolean hasTime)
Sets whether to output the date's time component.

Parameters:
hasTime - true include the time, false if it's strictly a date (defaults to "true")
Returns:
this

extended

public VCardPropertyScribe.DateWriter extended(boolean extended)
Sets whether to use extended format or basic.

Parameters:
extended - true to use extended format, false to use basic (defaults to "false")
Returns:
this

utc

public VCardPropertyScribe.DateWriter utc(boolean utc)
Sets whether to format the date in UTC time, or to include a UTC offset.

Parameters:
utc - true to format in UTC time, false to include the local timezone's UTC offset
Returns:
this

write

public String write()
Creates the date string.

Returns:
the date string


Copyright © 2012-2014 Michael Angstadt. All Rights Reserved.