An integer representing the hour.Įxpected values are 0-23, but other values are allowed: 32 will result in the second day of the next month.32 will result in the first day of the next month.-1 will result in the hour before the last hour of the previous month.0 will result in the last hour of the previous month.An integer representing the day of monthĮxpected values are 1-31, but other values are allowed: 13 will result in the second month of the next year.12 will result in the first month of the next year.-1 will result in the last month of the previous year.An integer representing the monthĮxpected values are 0-11, but other values are allowed: A four-digit value representing the year, negative values are allowed HTML Objects - button checkbox color date datetime datetime-local email file hidden image month number password radio range reset search submit text time url week ĭate.UTC() is a static method of the Date object. Web APIs API Console API Fetch API Fullscreen AlignContent alignItems alignSelf animation animationDelay animationDirection animationDuration animationFillMode animationIterationCount animationName animationTimingFunction animationPlayState background backgroundAttachment backgroundColor backgroundImage backgroundPosition backgroundRepeat backgroundClip backgroundOrigin backgroundSize backfaceVisibility border borderBottom borderBottomColor borderBottomLeftRadius borderBottomRightRadius borderBottomStyle borderBottomWidth borderCollapse borderColor borderImage borderImageOutset borderImageRepeat borderImageSlice borderImageSource borderImageWidth borderLeft borderLeftColor borderLeftStyle borderLeftWidth borderRadius borderRight borderRightColor borderRightStyle borderRightWidth borderSpacing borderStyle borderTop borderTopColor borderTopLeftRadius borderTopRightRadius borderTopStyle borderTopWidth borderWidth bottom boxShadow boxSizing captionSide caretColor clear clip color columnCount columnFill columnGap columnRule columnRuleColor columnRuleStyle columnRuleWidth columns columnSpan columnWidth counterIncrement counterReset cssFloat cursor direction display empt圜ells filter flex flexBasis flexDirection flexFlow flexGrow flexShrink flexWrap font fontFamily fontSize fontStyle fontVariant fontWeight fontSizeAdjust height isolation justif圜ontent left letterSpacing lineHeight listStyle listStyleImage listStylePosition listStyleType margin marginBottom marginLeft marginRight marginTop maxHeight maxWidth minHeight minWidth objectFit objectPosition opacity order orphans outline outlineColor outlineOffset outlineStyle outlineWidth overflow overflowX overflowY padding paddingBottom paddingLeft paddingRight paddingTop pageBreakAfter pageBreakBefore pageBreakInside perspective perspectiveOrigin position quotes resize right scrollBehavior tableLayout tabSize textAlign textAlignLast textDecoration textDecorationColor textDecorationLine textDecorationStyle textIndent textOverflow textShadow textTransform top transform transformOrigin transformStyle transition transitionProperty transitionDuration transitionTimingFunction transitionDelay unicodeBidi userSelect verticalAlign visibility width wordBreak wordSpacing wordWrap widows zIndex getUTCSeconds ( ) ) // 45 // UTC milliseconds of the dateĬonsole. getUTCMinutes ( ) ) // 32 // UTC seconds of the dateĬonsole. getUTCHours ( ) ) // 18 // UTC minutes of the dateĬonsole. getUTCFullYear ( ) ) // 2022 // UTC hour of the dateĬonsole. getUTCMonth ( ) ) // 8 (September) // UTC year of the dateĬonsole. The Date object provides several other methods that can be used to get individual date and time components according to UTC time zone: const date = new Date ( ) // UTC day of the month (1-31)Ĭonsole. The toISOString() method returns a string representing the date in the ISO 8601 format, according to the universal time zone. The toUTCString() method returns a date object as a string using the UTC time zone.Īlternatively, you could also use the toISOString() method to get the date string in ISO 8601 format of YYYY-MM-DDTHH:mm:ss.sssZ: const isoStr = new Date ( ). const date = new Date ( ) const utcStr = date. This method converts a Date object to a string using the UTC time zone. In JavaScript, the toUTCString() method can be used to get the current date and time in UTC.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |