Skip to content
Snippets Groups Projects

Fix Queue labelling

Files

@@ -17,6 +17,9 @@
*/
package nl.tudelft.queue.config;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import nl.tudelft.queue.dialect.AuthenticatedPersonDialect;
import org.springframework.context.annotation.Bean;
@@ -40,4 +43,13 @@ public class ThymeleafConfig {
public AuthenticatedPersonDialect authenticatedPersonDialect() {
return new AuthenticatedPersonDialect();
}
/**
* Checks whether today is the day.
*
* @return {@code true} when today is the day, {@code false} if today is not the day.
*/
public boolean isTheDay() {
return DateTimeFormatter.ofPattern("dd-MM").format(LocalDateTime.now()).equals("01-04");
}
}
Loading