How to get the date from the JavaScript Date type that C # developers are addicted to

Introduction

This article is a reminder that I got stuck in the development of a personally developed Web service.

Get the month

You can get it using getMonth in here. However, please note that the return value is based on __0, such as January ⇒ 0, February ⇒ 1. Since I usually develop in C #, I thought that the return value was January ⇒ January, February ⇒ 2, and I got into it.

Get the day

You can get it using getDate in here. In C #, it can be obtained with the DateTime.Day property, so I assumed that it would be obtained using getDay of here. I'm addicted to it. By the way, getDay is a method to get the day of the week.

Recommended Posts

How to get the date from the JavaScript Date type that C # developers are addicted to
How to get the date in java
[Java] How to convert from String to Path type and get the path
How to write a migration from Rails datetime type to date type
[IOS] How to get the table name from AWS DynamoDB
How to get the longest information from Twitter as of 12/12/2016
[IOS14] How to get Data type image data directly from PHPickerViewController?
How to apply C code format from the command line
The road from JavaScript to Java
About the matter that I was addicted to how to use hashmap
How to get date data in Ruby
[Java] How to get the current date and time and specify the display format
[IOS] How to get data from DynamoDB
[Java] How to set the Date time to 00:00:00
[Java] How to get the current directory
[Flutter] How to use C / C ++ from Dart?
How to get the current date as a string in yyyyMMdd format
How to get the setting value (property value) from the database in Spring Framework
[Rails] How to read the XML file uploaded from the screen with Hash type
Differences between Java, C # and JavaScript (how to determine the degree of obesity)
I want to get only the time from Time type data ...! [Strftime] * Additional notes
Convert from C String pointer to Swift String type
How to get a heapdump from a Docker container
How to get Class from Element in Java
How to get today's day of the week
[Updated from time to time] Links that are indebted
[Java] How to get the redirected final URL
[Java] How to get the authority of the folder
[Ruby] How to get / select only records that are more than XX years old
[Java] I want to calculate the difference from the date
How to write Scala from the perspective of Java
[Java] How to extract the file name from the path
[Java] How to get the maximum value of HashMap
[Android] How to get the setting language of the terminal
How to determine the look-ahead request (Prefetch) from the browser
[Rails] How to get the contents of strong parameters
Addicted to the webpacker that comes standard with Rails 6
[Ruby] How to get the tens place and the ones place
[Swift] How to get the document ID of Firebase
How to get jdk etc from oracle with cli
[Swift5] How to analyze complex JSON and get the index of the element that satisfies the condition
A memorandum when I investigated how to convert from Epoch Time to Date type in Scala
How to type backslash \
How to get the class name / method name running in Java
How to transition from the [Swift5] app to the iPhone settings screen
Difference between Java and JavaScript (how to find the average)
Get to the abbreviations from 5 examples of iterating Java lists
[Java] How to convert a character string from String type to byte type
How to disable Set-Cookie from API on the front side
How to get the log when install4j does not start
Change only one character from the String type string to uppercase
Learn how to customize the Navigation Bar from the sample app
[jsoup] How to get the full amount of a document
[Docker] How to access the host from inside the container. http://host.docker.internal:
How to solve the problem that you can not pull image from docker hub with Minikube
How to deal with the type that I thought about writing a Java program for 2 years