APLawrence.com -  Resources for Unix and Linux Systems, Bloggers and the self-employed

How can I find out when our anniversary falls on a Saturday?


Some material is very old and may be incorrect today

© August 2015 Anthony Lawrence

Anonymous asks:

How can I find out when our anniversary falls on a Saturday? I thought it would be easy, but it doesn't seem to be?

Actually, Google can help with this. For example, just type in your browser window "what day is 7/11/2020":

Google knows what day it is

In Linux/Unix Bash, there's a quick command line that will find these dates:

$ for i in {2016..2050}; do echo -n "$i ";cal 07 $i | grep 11; done| grep "10 11$"
2020  5  6  7  8  9 10 11
2026  5  6  7  8  9 10 11
2037  5  6  7  8  9 10 11
2043  5  6  7  8  9 10 11
2048  5  6  7  8  9 10 11
 

Note that can look backward just as easily:

$ for i in {2016..1960}; do echo -n "$i ";cal 07 $i | grep 11; done| grep "10 11$"
2015  5  6  7  8  9 10 11
2009  5  6  7  8  9 10 11
1998  5  6  7  8  9 10 11
1992  5  6  7  8  9 10 11
1987  5  6  7  8  9 10 11
1981  5  6  7  8  9 10 11
1970  5  6  7  8  9 10 11
1964  5  6  7  8  9 10 11
 

Somewhere there may be an online calculator for this. I couldn't find one, but I did find these:

Weekday Calculator – What Day is this Date?

Doomsday Rule

Is there a term for an anniversary that falls on the same day of the week as its original date?

Holidays

Calculating holidays and their observances

Calculate next workday when date falls on weekend

Calculating Holidays in script


If you found something useful today, please consider a small donation.



Got something to add? Send me email.





(OLDER)    <- More Stuff -> (NEWER)    (NEWEST)   

Printer Friendly Version

->
-> How can I find out when our anniversary falls on a Saturday?


Inexpensive and informative Apple related e-books:

Sierra: A Take Control Crash Course

Take Control of OS X Server

Take Control of Pages

iOS 8: A Take Control Crash Course

El Capitan: A Take Control Crash Course





More Articles by © Anthony Lawrence





Printer Friendly Version

Have you tried Searching this site?

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more.

Contact us


Printer Friendly Version





Actually I made up the term "object-oriented", and I can tell you I did not have C++ in mind. (Alan Kay)




Linux posts

Troubleshooting posts


This post tagged:

Bash

Forum

Scripting

Shell



Unix/Linux Consultants

Skills Tests

Unix/Linux Book Reviews

My Unix/Linux Troubleshooting Book

This site runs on Linode