Example usage for org.joda.time LocalDateTime toString

List of usage examples for org.joda.time LocalDateTime toString

Introduction

In this page you can find the example usage for org.joda.time LocalDateTime toString.

Prototype

public String toString(String pattern, Locale locale) throws IllegalArgumentException 

Source Link

Document

Output the date using the specified format pattern.

Usage

From source file:ca.ualberta.cs.shoven_habittracker.MainActivity.java

License:Creative Commons License

public Integer setDateToday(TextView textView) {
    LocalDateTime now = new LocalDateTime(DateTimeZone.forID("Canada/Mountain"));
    textView.setText(now.toString("EEEE, MMMM dd, yyyy", Locale.CANADA));
    return now.getDayOfWeek() % 7;
}

From source file:org.supercsv.cellprocessor.joda.FmtLocalDateTime.java

License:Apache License

/**
 * {@inheritDoc}/*from   ww  w .  j a  v  a  2s .com*/
 */
@Override
protected String format(final LocalDateTime jodaType, final String pattern, final Locale locale) {
    return jodaType.toString(pattern, locale);
}