Example usage for java.time MonthDay parse

List of usage examples for java.time MonthDay parse

Introduction

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

Prototype

public static MonthDay parse(CharSequence text, DateTimeFormatter formatter) 

Source Link

Document

Obtains an instance of MonthDay from a text string using a specific formatter.

Usage

From source file:Main.java

public static void main(String[] args) {
    MonthDay m = MonthDay.parse("10 10", DateTimeFormatter.ofPattern("M dd"));

    System.out.println(m);/*ww  w.j a v a 2s.  c om*/

}