Java Today getTimeNumberToday()

Here you can find the source of getTimeNumberToday()

Description

get Time Number Today

License

Open Source License

Declaration

public static long getTimeNumberToday() 

Method Source Code


//package com.java2s;
import java.text.ParseException;
import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {
    public static SimpleDateFormat yyyyMMdd = new SimpleDateFormat("yyyy-MM-dd");

    public static long getTimeNumberToday() {
        Date date = new Date();
        String str = yyyyMMdd.format(date);
        try {/*from   ww w .  java 2 s  .c  o  m*/
            date = yyyyMMdd.parse(str);
            return date.getTime() / 1000L;
        } catch (ParseException e) {
            e.printStackTrace();
        }
        return 0L;
    }
}

Related

  1. getSomedayAfterToday(int x)
  2. getStartOfDayRelative(int daysFromToday)
  3. getStartOfToday()
  4. getStartOfToday()
  5. getStringToday()
  6. getToday()
  7. getToday()
  8. getToday()
  9. getToday()