Java Code Examples for java.util.Locale.KOREA

The following are Jave code examples for showing how to use KOREA of the java.util.Locale class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: pracler   File: Global.java   View Source Code Vote up 6 votes
public void addHistory(int songid)
{
    // Regdate
    String format = new String("yyyyMMddHHmmss");
    SimpleDateFormat sdf = new SimpleDateFormat(format, Locale.KOREA);
    String Regdate = sdf.format(new Date());

    // Local Save
    LocalPlayHistory localPlayHistory = new LocalPlayHistory();
    localPlayHistory.uid = songid;
    localPlayHistory.Regdate = Regdate;

    localHistoryManager.addHistory(localPlayHistory);
    localHistoryManager.getHistoryDesending();

    // Remote Server save
    MusicDto musicDto = mMusicManager.getMusicDto(songid+"");
    PlayHistory playHistory = new PlayHistory();
    playHistory.artist = MusicDto.replaceForInput(musicDto.getArtist());
    playHistory.album = MusicDto.replaceForInput(musicDto.getAlbum());
    playHistory.title = MusicDto.replaceForInput(musicDto.getTitle());

    userManager.addHistory(playHistory);
}
 
Example 2
Project: pracler   File: UserManager.java   View Source Code Vote up 5 votes
public void addHistory(PlayHistory playHistory)
{
    RemoteDatabaseManager rdm = new RemoteDatabaseManager();
    DatabaseReference dr = rdm.getUsersReference();

    String format = new String("yyyyMMddHHmmss");
    SimpleDateFormat sdf = new SimpleDateFormat(format, Locale.KOREA);

    playHistory.Regdate = MusicDto.replaceForInput(sdf.format(new Date()));
    playHistory.artist = MusicDto.replaceForInput(playHistory.artist);
    playHistory.album = MusicDto.replaceForInput(playHistory.album);
    playHistory.title = MusicDto.replaceForInput(playHistory.title);

    dr.child(loginUser.getUid()).child("log").child(playHistory.Regdate).setValue(playHistory);
}
 
Example 3
Project: pracler   File: PraclerDate.java   View Source Code Vote up 5 votes
public static String getNowDate()
{
    String format = new String("yyyyMMddHHmmss");
    SimpleDateFormat sdf = new SimpleDateFormat(format, Locale.KOREA);
    String Regdate = sdf.format(new Date());

    return Regdate;
}
 
Example 4
Project: DMS   File: DateUtils.java   View Source Code Vote up 5 votes
public static String dateToWeekDateString(Date date) {
    Calendar cal = Calendar.getInstance(Locale.KOREA);
    cal.setTime(date);
    cal.set(Calendar.DAY_OF_WEEK, Calendar.SATURDAY);
    SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-0W", Locale.KOREA);

    return sdf.format(cal.getTime());
}
 
Example 5
Project: DMS   File: CalendarView.java   View Source Code Vote up 5 votes
public String getLastSelectedWeekString() {
    // 토요일 기준으로 주 구분
    Calendar calendar = Calendar.getInstance(Locale.KOREA);
    calendar.setTime(mLastSelectedDay);
    calendar.set(Calendar.DAY_OF_WEEK, Calendar.SATURDAY);
    SimpleDateFormat sdf = new SimpleDateFormat("yyyy년 M월 W주", Locale.KOREA);
    return sdf.format(calendar.getTime());
}
 
Example 6
Project: DMS   File: QueryUtils.java   View Source Code Vote up 5 votes
public static boolean checkDate(String str) {
    boolean dateValidity = true;
    SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.KOREA); // 20041102101244
    df.setLenient(false);
    try {
        Date dt = df.parse(str);
    } catch (ParseException | IllegalArgumentException pe) {
        dateValidity = false;
    }
    return dateValidity;
}
 
Example 7
Project: otter-G   File: ObjectProfiler.java   View Source Code Vote up 5 votes
private static boolean isSharedFlyweight(Object obj) {
    if (obj == null) {
        return true;
    }
    if (obj == Boolean.TRUE || obj == Boolean.FALSE) {
        return true;
    }
    if (/* obj == Locale.ROOT || *//* Java 6 */
    obj == Locale.ENGLISH || obj == Locale.FRENCH || obj == Locale.GERMAN || obj == Locale.ITALIAN
            || obj == Locale.JAPANESE || obj == Locale.KOREAN || obj == Locale.CHINESE
            || obj == Locale.SIMPLIFIED_CHINESE || obj == Locale.TRADITIONAL_CHINESE || obj == Locale.FRANCE
            || obj == Locale.GERMANY || obj == Locale.ITALY || obj == Locale.JAPAN || obj == Locale.KOREA
            || obj == Locale.CHINA || obj == Locale.PRC || obj == Locale.TAIWAN || obj == Locale.UK
            || obj == Locale.US || obj == Locale.CANADA || obj == Locale.CANADA_FRENCH) {
        return true;
    }
    if (obj == Collections.EMPTY_SET || obj == Collections.EMPTY_LIST || obj == Collections.EMPTY_MAP) {
        return true;
    }
    if (obj == BigInteger.ZERO || obj == BigInteger.ONE) {
        return true;
    }
    if (obj == System.in || obj == System.out || obj == System.err) {
        return true;
    }
    if (obj == String.CASE_INSENSITIVE_ORDER) {
        return true;
    }
    if (obj == JarFile.MANIFEST_NAME) {
        return true;
    }
    return false;
}
 
Example 8
Project: DMS   File: SlimDatePicker.java   View Source Code Vote up 4 votes
private String getDateString() {
    SimpleDateFormat sdf = new SimpleDateFormat("yyyy년 MM월 dd일", Locale.KOREA);
    return sdf.format(mCalendar.getTime());
}