Here you can find the source of luisDate(LocalDateTime date)
public static String luisDate(LocalDateTime date)
//package com.java2s; //License from project: Open Source License import java.time.LocalDateTime; public class Main { private static final String dateDelimiter = "-"; public static String luisDate(Integer year, Integer month, Integer day) { if (year == -1) { if (month == -1) { if (day == -1) { return String.join(dateDelimiter, "XXXX", "XX", "XX"); }/*from w ww . ja v a 2s . c om*/ return String.join(dateDelimiter, "XXXX", "XX", String.format("%02d", day)); } return String.join(dateDelimiter, "XXXX", String.format("%02d", month), String.format("%02d", day)); } return String.join(dateDelimiter, String.format("%04d", year), String.format("%02d", month), String.format("%02d", day)); } public static String luisDate(LocalDateTime date) { return luisDate(date.getYear(), date.getMonthValue(), date.getDayOfMonth()); } }