Java LocalTime fastTimeWrite(LocalTime localTime)

Here you can find the source of fastTimeWrite(LocalTime localTime)

Description

fast Time Write

License

Open Source License

Declaration

public static char[] fastTimeWrite(LocalTime localTime) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.time.LocalTime;

public class Main {
    public static char[] fastTimeWrite(LocalTime localTime) {
        char[] c = new char[5];
        int h = localTime.getHour();
        c[0] = (char) ('0' + (h / 10));
        c[1] = (char) ('0' + (h % 10));
        c[2] = (char) (':');
        int m = localTime.getMinute();
        c[3] = (char) ('0' + (m / 10));
        c[4] = (char) ('0' + (m % 10));
        return c;
    }/*www  . ja  v  a  2  s  .co m*/
}

Related

  1. asDate(LocalTime localTime)
  2. convertLocalTimeToString(LocalTime time)
  3. currentTimeIsBetween(LocalTime from, LocalTime to)
  4. deserializeLocalTime(String date)
  5. getTimeDiff(LocalTime start, LocalTime end)
  6. isBetween(LocalTime lt, LocalTime startTime, LocalTime endTime)
  7. isLocalTimeInRange(LocalTime value, LocalTime optionalMinimum, LocalTime optionalMaximum, boolean inclusiveOfEndpoints)
  8. parseLocalTime(String string)