Here you can find the source of dateToPGNDate(long when)
Parameter | Description |
---|---|
when | date to convert |
public static String dateToPGNDate(long when)
//package com.java2s; //License from project: GNU General Public License import java.text.SimpleDateFormat; import java.util.Date; public class Main { /**/*from w w w . ja v a 2 s .c om*/ * get PGN format of the date (the version in chesspresso.pgn.PGN gets the * month wrong :( ) * * @param when date to convert * @return PGN format of the date */ public static String dateToPGNDate(long when) { return new SimpleDateFormat("yyyy.MM.dd").format(new Date(when)); } }