| |

VerySource

 Forgot password?
 Register
Search
View: 758|Reply: 4

The problem of converting dates to days of the week.

[Copy link]

1

Threads

2

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-1-3 21:20:01
| Show all posts |Read mode
Enter the date of any day to get the day of the week, such as "2007-1-1" to output "Monday".
How to write an algorithm?
(Take January 1st AD as Sunday and consider leap years)
Reply

Use magic Report

0

Threads

19

Posts

12.00

Credits

Newbie

Rank: 1

Credits
12.00

 China

Post time: 2020-1-3 21:45:01
| Show all posts
Write yourself and practice your hands first.
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-1-3 22:36:01
| Show all posts
Homework again? Oh, you can write a simple date class and add it.
Reply

Use magic Report

1

Threads

2

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

 Author| Post time: 2020-1-3 23:12:01
| Show all posts
Yes, I'll write first, but I can't write it
Reply

Use magic Report

0

Threads

9

Posts

9.00

Credits

Newbie

Rank: 1

Credits
9.00

 China

Post time: 2020-1-4 00:24:01
| Show all posts
Just use time.h directly
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list