---
title: "Discussion on \"เรื่องประหลาดๆ ของการนับปีใน Java\" | Hashnode"
description: "Discussion on \"เรื่องประหลาดๆ ของการนับปีใน Java\". ลืมหัวข้อ blog นี้ไปก่อนนะครับ แล้วลองพยายามเดาดูว่าโค้ด Java ข้างล่างนี้พยายามทำอะไร\nมันก็ดูตรงไปตรงมาใช่มั้ยครับ แล้วถ้ารันออกมาสมมติวันนี้วันที่ 1 ธันวาคม 2021 สิ่งที่ function นี้คืนกลับมาก็\n\nเป็น 2020-12-01 ใช่มั้ยครับ ถ้าเราเขียน Unit test ไว้ ..."
url: "https://hashnode.com/posts/java-year-wat/61a79b36be456923c52bbdb1"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [เรื่องประหลาดๆ ของการนับปีใน Java](https://yothinix.hashnode.dev/java-year-wat?utm_source=hashnode&utm_medium=feed)

ลืมหัวข้อ blog นี้ไปก่อนนะครับ แล้วลองพยายามเดาดูว่าโค้ด Java ข้างล่างนี้พยายามทำอะไร มันก็ดูตรงไปตรงมาใช่มั้ยครับ แล้วถ้ารันออกมาสมมติวันนี้วันที่ 1 ธันวาคม 2021 สิ่งที่ function นี้คืนกลับมาก็ เป็น 2020-12-01 ใช่มั้ยครับ ถ้าเราเขียน Unit test ไว้ ...

Dec 1, 2021 · 2 min read · yothinix.hashnode.dev  
Read the article

-   [#java](https://hashnode.com/tag/java)
-   [#development](https://hashnode.com/tag/development)

## Written by

[Yothin Muangsommuk](https://hashnode.com/@yothinix)

@yothinix · Bangkok, Thailand

  
[View profile](https://hashnode.com/@yothinix)

Pythonista ♥ Python, Django, Emacs and Star Trek 🖖

My name is Yothin Muangsommuk. I've been in many roles in Software Development team, Software Engineer, Tech Lead, and Technical Coach. My focus has always been improving a sustainability and maintainability through Technical Excellence and Software Craftsmanship. I also A Python enthusiasm, An occasional conference speaker (PyCon APAC, Code Mania, Barcamp Bangkok), and a community organizer (PyCon Thailand, PySomTum, GDG Cloud Bangkok). Interests: Programming Language Design, Software Engineering, Distributed System

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
