Example usage for java.time MonthDay format

List of usage examples for java.time MonthDay format

Introduction

In this page you can find the example usage for java.time MonthDay format.

Prototype

public String format(DateTimeFormatter formatter) 

Source Link

Document

Formats this month-day using the specified formatter.

Usage

From source file:Main.java

public static void main(String[] args) {
    MonthDay m = MonthDay.now();
    String n = m.format(DateTimeFormatter.ofPattern("M"));
    System.out.println(n);//from   ww  w .  j  av a2s  . co  m

}