Skip to content

Instantly share code, notes, and snippets.

@AdamBien

AdamBien/NextAirhacksTV.md

Last active Mar 14, 2021
Embed
What would you like to do?
Run: java NextAirhacks.java to get the first Monday of the month
import java.time.DayOfWeek;
import java.time.LocalDate;
import static java.time.temporal.TemporalAdjusters.*;

public class NextAirhacksTV {

    public static void main(String[] args) {
        var now = LocalDate.now().plusMonths(1);
        var nextMondayOfTheMonth = now.
                with(firstDayOfMonth()).
                with(next(DayOfWeek.MONDAY));
        System.out.printf("See you at next airhacks.tv: %s 8pm CET (UTC +1)",nextMondayOfTheMonth);
    }
}

run with: java NextAirhacksTV.java to get the next airhacks.tv date. (the date may change, so very verify on airhacks.tv, adambien.blog or meetup.com/airhacks)

@arend-von-reinersdorff

This comment has been minimized.

Copy link

@arend-von-reinersdorff arend-von-reinersdorff commented Mar 14, 2021

Suggestion to also find Monday the 1st:

var nextMondayOfTheMonth = now.with(firstInMonth(DayOfWeek.MONDAY));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment