DateTime.Now.ToString ("dddd", New System.Globalization.CultureInfo ("ZH-CN"));
Today on the Internet to see some of the implementation of C # on the basis of the day of the week to calculate the introduction:
The algorithm is as follows:Kimlarsson Calculation formulaw= (d+2*m+3* (m+1)/5+y+y/4-y/100+y/400) MoD 7in the formula D represents the number of days in the date, m represents the number of months,
PHP Week Get Code:
Date ("L"); Data can be obtained in English for weeks such as Sunday
Date ("W"); This can get the numbers for weeks like 123, note that 0 is Sunday
Copy Code get Chinese weekday:
$weekarray =array ("Day", "one", "two", "three", "four", "five", "six"); Define an array first
echo "Week". $weeka
$this->created_at is the timestamp value and the conversion date is as followsDate (' M.D ', $this->created_at): Y represents the last two of the year, Y stands for, m for the digital month, M for the English month, D for the day, and D for the Week (English)To display the Chinese week, you want to:$weeks =[' Monday ', ' Tuesday ', ' Wednesday ', ' Thursday ', '
1. High-precision addition, subtraction, multiplication#include Run:2. Today is the day of the weekRequirements: Enter a valid date to determine the day of the weekIdea: Calculate the number of days from the year of the year A.D. January 1, divided by 7 to convert to day of the week#include Run:3. Four-bit square numbe
==9) {
$begin _this_quarter = Date (' y-07-01 00:00:00 ');
$end _this_quarter = Date ("y-09-30 23:59:59");
}Else{
$begin _this_quarter = Date (' y-10-01 00:00:00 ');
$end _this_quarter = Date ("y-12-31 23:59:59");
}
$begin _this_year = Date (' y-01-01 00:00:00 ');
$end _this_year = Date (' y-12-31 23:59:59 ');
The first quarter is January 1 to March 31, the second quarter is April 1 to June 30, the third quarter is July January-September 30, and the quarter is October January-Dece
specified date. String Tree = TreeYear. substring (chinseCaleander. // obtain the Zodiac information GetTerrestrialBranch (intYear)-1, 1); // GetTerrestrialBranch calculates the geographic branch of the specified year in the (60 years) cycle, // Substring (x, y) retrieve the substring from this instance. The substring starts from the specified character position and has the specified length MessageBox. show ("this year is the Zodiac" + Tree + "year", // output the Zodiac information "judge the
PHP's date () function is very powerful, reasonable use of the function of various parameters to achieve our day-to-day development of various requirements, today to talk about how to use PHP to determine how today is the day of the week method.
For an explanation of the PHP date () function, you can refer to this sit
Python obtains the day of the week as an example.
This example describes how to obtain the day of a week in Python. We will share this with you for your reference. The details are as follows:
The following uses the Spring Festival in as an example:
Import re; import time; import datetime; if (_ name __= = "_ main _"
What Oracle DBA should do on a daily, weekly, and monthly basis (I) Check alert on a daily basis. log ② check the environment ● check whether the database instance is working properly ▼ ps-ef | grep ora _ explain select status from v $ instance ● whether the listener is working properly ▼ lsnrctl status ● whether the tablespace is faulty ▼ select tablespace_name, status from dba_tablespace; ● control file, log file is normal running v $ controlfile running v $ log, v $ logfile ③ performance moni
Python 18th days, python first day of the week
Learning content:
Json module, pickle module, and shelve Module
Json module serialization:
1 import json, pickle 2 3 info = {4 'name': 'A', 5 'age': 34, 6 'function': '7} 8 with open('text.txt ', 'W') as f: 9 f.write(json.dumps('test.txt ') # create a file for storing serialized data 10 f. write (json. dumps (info) # serialization
Deserialization of the json m
Explained below:var datelocalnow=new Date (); Set up a Time classvar datelocalyear=datelocalnow.getfullyear (); Get yearvar datelocalmonth= (datelocalmonth= "0" + (Datelocalnow.getmonth () +1)). substr (datelocalmonth.length-2,2); Get monthvar datelocalday= (datelocalday= "0" +datelocalnow.getdate ()). substr (datelocalday.length-2,2); Get Datevar datelocalweekday=datelocalweek[datelocalnow.getday ()]; Get WeekDatelocalnow.gethours () Get hoursDatelocalnow.getminutes () Get minutesDatelocalnow.g
This article mainly introduces the cascading date selection operation for JavaScript time operations, involving years, months, days, and weeks, if you are interested, refer to the example in this article to introduce the code for the cascading date selection operation for JavaScript time operations. The details are as follows:
:
Code:
Year, month, day, and week Cascade
/w = (d+2*m+3* (m+1)/5+y+y/4-y/100+y/400) MoD 7 (December needs to be considered as 13 in the previous year, 1 April)#include #includestring.h>#include#include#include#include#include#includeSet>#include#includestring>#include#include#include#includeusing namespacestd;intMain () {inty, M, D, W; while(SCANF ("%d%d%d", y,m,d)! =EOF) { if(M 3) {m+= A; --y; } W= (d+2*m+3* (m+1)/5+y+y/4-y/ -+y/ -+1)%7; printf ("%d\n", W); } return 0;}A problem about date calculates the
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.