All Downloads are FREE. Search and download functionalities are using the official Maven repository.

edu.dlsu.SUMOs.util.DateUtils Maven / Gradle / Ivy

Go to download

Sigma knowledge engineering system is an system for developing, viewing and debugging theories in first order logic. It works with Knowledge Interchange Format (KIF) and is optimized for the Suggested Upper Merged Ontology (SUMO) www.ontologyportal.org.

There is a newer version: 2.10
Show newest version
package edu.dlsu.SUMOs.util;

import java.util.Calendar;
import java.text.SimpleDateFormat;

//System.out.println(DateUtils.now("dd MMMMM yyyy"));
//System.out.println(DateUtils.now("yyyyMMdd"));
//System.out.println(DateUtils.now("dd.MM.yy"));
//System.out.println(DateUtils.now("MM/dd/yy"));
//System.out.println(DateUtils.now("yyyy.MM.dd G 'at' hh:mm:ss z"));
//System.out.println(DateUtils.now("EEE, MMM d, ''yy"));
//System.out.println(DateUtils.now("h:mm a"));
//System.out.println(DateUtils.now("H:mm:ss:SSS"));
//System.out.println(DateUtils.now("K:mm a,z"));
//System.out.println(DateUtils.now("yyyy.MMMMM.dd GGG hh:mm aaa"));

public class DateUtils {
  public static final String DATE_FORMAT_NOW = "yyyy-MM-dd HH:mm:ss";

  public static String now(String dateFormat) {
    Calendar cal = Calendar.getInstance();
    SimpleDateFormat sdf = new SimpleDateFormat(dateFormat);
    return sdf.format(cal.getTime());

  }

  public static void  main(String arg[]) {
//    System.out.println("Now : " + DateUtils.now());
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy