Here you can find the source of getFormattedDateNow(@Nonnull final String sFormat)
@Nonnull public static String getFormattedDateNow(@Nonnull final String sFormat)
//package com.java2s; import java.text.SimpleDateFormat; import java.util.Date; import javax.annotation.Nonnull; public class Main { @Nonnull public static String getFormattedDateNow(@Nonnull final String sFormat) { return formatDate(sFormat, new Date()); }//from ww w . ja va2 s. c om @Nonnull public static String formatDate(@Nonnull final String sFormat, @Nonnull final Date aValue) { return new SimpleDateFormat(sFormat).format(aValue); } }