public class EjCD {
public static void main(String[] args) {
Date d = new Date();
System.out.println("Fecha actual del sistema: "+d);
Date d1 = new Date(2014 -1900, 06,2);
System.out.println(""+d1);
//año 1900
// mes desde el 0 al 11
Date d3 = new Date(30000000L); //milisegundos que han transcurrido desde 19970
System.out.println("d2= "+d3);
}
}
poner atención a estos métodos
getDateInstance();
Para la localidad puedes ir a
The language argument is a valid ISO Language Code. These codes are the lower-case, two-letter codes as defined by ISO-639. You can find a full list of these codes at a number of sites, such as:
http://www.loc.gov/standards/iso639-2/englangn.html
The country argument is a valid ISO Country Code. These codes are the upper-case, two-letter codes as defined by ISO-3166. You can find a full list of these codes at a number of sites, such as:
http://www.iso.ch/iso/en/prods-services/iso3166ma/02iso-3166-code-lists/list-en1.html
No hay comentarios:
Publicar un comentario