All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.flips.utils.DateTimeUtils Maven / Gradle / Ivy

Go to download

Flips Core framework, provides all the flip annotations, conditions and different advices

There is a newer version: 1.1
Show newest version
package org.flips.utils;

import java.time.DayOfWeek;
import java.time.ZoneId;
import java.time.ZonedDateTime;

public final class DateTimeUtils {

    public static final ZoneId UTC  = ZoneId.of("UTC");

    private DateTimeUtils() {
        throw new AssertionError("No DateTimeUtils instances for you!");
    }

    public static ZonedDateTime getCurrentTime(){
        return ZonedDateTime.now(UTC);
    }

    public static DayOfWeek getDayOfWeek(){
        return getCurrentTime().getDayOfWeek();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy