Here you can find the source of fastDateWrite(LocalDate localDate)
public static char[] fastDateWrite(LocalDate localDate)
//package com.java2s; //License from project: Open Source License import java.time.LocalDate; public class Main { public static char[] fastDateWrite(LocalDate localDate) { char[] c = new char[10]; int y = localDate.getYear(); c[0] = (char) ('0' + y / 1000); c[1] = (char) ('0' + ((y % 1000) / 100)); c[2] = (char) ('0' + ((y % 100) / 10)); c[3] = (char) ('0' + (y % 10)); c[4] = (char) ('-'); int m = localDate.getMonthValue(); c[5] = (char) ('0' + (m / 10)); c[6] = (char) ('0' + (m % 10)); c[7] = (char) ('-'); int d = localDate.getDayOfMonth(); c[8] = (char) ('0' + (d / 10)); c[9] = (char) ('0' + (d % 10)); return c; }//from w w w . ja v a 2s . co m }