Object DateUtils
-
- All Implemented Interfaces:
@RestrictTo(value = {RestrictTo.Scope.LIBRARY_GROUP}) public class DateUtils
-
-
Method Summary
Modifier and Type Method Description final static StringparseDateToView(String month, String year)final static StringtoServerDateFormat(Calendar calendar)Convert to server date format. final BooleanmatchesFormat(String date, String format)final StringformatStringDate(String date, Locale shopperLocale, String inputFormat)Format server date pattern to regular date pattern (30/03/2023). final StringformatDateToString(Calendar calendar, String pattern)Format date time to provided date time pattern. -
-
Method Detail
-
parseDateToView
final static String parseDateToView(String month, String year)
-
toServerDateFormat
final static String toServerDateFormat(Calendar calendar)
Convert to server date format.
-
matchesFormat
final Boolean matchesFormat(String date, String format)
-
formatStringDate
final String formatStringDate(String date, Locale shopperLocale, String inputFormat)
Format server date pattern to regular date pattern (30/03/2023).
- Parameters:
date- date value coming from serverinputFormat- server date pattern
-
formatDateToString
final String formatDateToString(Calendar calendar, String pattern)
Format date time to provided date time pattern.
- Parameters:
calendar- Calendar instance to be formattedpattern- Date pattern
-
-
-
-