1/* GENERATED SOURCE. DO NOT MODIFY. */ 2/* 3****************************************************************************** 4* Copyright (C) 2007, International Business Machines Corporation and * 5* others. All Rights Reserved. * 6****************************************************************************** 7*/ 8 9package android.icu.impl.duration; 10 11import java.util.Date; 12import java.util.TimeZone; 13 14/** 15 * Abstract formatter for dates. Differs from DateFormat in that it 16 * provides <code>withLocale</code> and <code>withTimeZone</code> methods. 17 * @hide Only a subset of ICU is exposed in Android 18 */ 19public interface DateFormatter { 20 21 /** 22 * Format the date, provided as a java Date object. 23 * 24 * @param date the date 25 * @return the formatted time 26 */ 27 String format(Date date); 28 29 /** 30 * Format the date, provided as milliseconds. 31 * 32 * @param date the date in milliseconds 33 * @return the formatted time 34 */ 35 String format(long date); 36 37 /** 38 * Returns a new DateFormatter that uses data for a new locale. 39 * 40 * @param locale the new locale to use 41 * @return a new formatter for the given locale 42 */ 43 DateFormatter withLocale(String localeName); 44 45 /** 46 * Returns a new DateFormatter that uses the new time zone. 47 * 48 * @param tz the new time zone 49 * @return a new formatter for the given time zone 50 */ 51 DateFormatter withTimeZone(TimeZone tz); 52} 53