package test.nw;

import java.time.Duration;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.time.temporal.ChronoUnit;

import org.apache.commons.lang3.time.FastDateFormat;

public class TimeTest {
	
	public static void main(String[] args) {
//		LocalDateTime now = LocalDateTime.now();
//		now = now.truncatedTo(ChronoUnit.SECONDS);
//		System.out.println(now.plusMinutes(120));
//		System.out.println(now.minusMinutes(61));
//		FastDateFormat s = FastDateFormat.getInstance();
//		LocalDateTime ordertime = LocalDateTime.now().truncatedTo(ChronoUnit.DAYS);
//		System.out.println(ordertime.with(LocalTime.MAX));
		System.err.println(Duration.ofHours( 24 ).toMinutes());
		
		
//		int gapInMinutes =  60 ;  // Define your span-of-time.
//		int loops = ( (int) Duration.ofHours( 24 ).toMinutes() / gapInMinutes ) ;
//		List<LocalTime> times = new ArrayList<>( loops ) ;
//
//		LocalTime time = LocalTime.MIN ;  // '00:00'
//		
//		for( int i = 1 ; i <= loops ; i ++ ) {
//		    times.add( time ) ;
//		    // Set up next loop.
//		    time = time.plusMinutes( gapInMinutes ) ;
//		}
//
//		System.out.println( times.size() + " time slots: " ) ;
//		System.out.println( times ) ;
		
		
		LocalDateTime now = LocalDateTime.now();
		System.out.println(now);
		DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMddHHmmssSSSSSS");
		
		System.out.println(now.format(formatter));
		
		
		int[] totle=  new int[]{};
		System.out.println(totle.length);
		
	}
	
	

}
