src/main/java/edu/bu/met/cs665/HeaderPackage/NewCustomerHeader.java
/**
     * This method generates a random date to use in the email header
     */
This method generates a random date to use in the email header
This method generates a random date to use in the email header
@Override
    public void generateRandomDate() {
        LocalDate from = LocalDate.of(2016, 1, 1);
        LocalDate to = LocalDate.of(2020, 4, 6);
        long days = from.until(to, ChronoUnit.DAYS);
        long randomDays = ThreadLocalRandom.current().nextLong(days + 1);
        LocalDate randomDate = from.plusDays(randomDays);
        System.out.println(randomDate.format(DateTimeFormatter.ofPattern("dd/MM/yyyy")));
    }
@ Override public void generateRandomDate ( ) { LocalDate from = LocalDate . of ( 2016 , 1 , 1 ) ; LocalDate to = LocalDate . of ( 2020 , 4 , 6 ) ; long days = from . until ( to , ChronoUnit . DAYS ) ; long randomDays = ThreadLocalRandom . current ( ) . nextLong ( days + 1 ) ; LocalDate randomDate = from . plusDays ( randomDays ) ; System . out . println ( randomDate . format ( DateTimeFormatter . ofPattern ( "dd/MM/yyyy" ) ) ) ; }
This method generates a random date to use in the email header
This method generates a random date to use in the email header