Showing posts with label calendar. Show all posts
Showing posts with label calendar. Show all posts

British Summer Time

This morning, I woke up early thanks to the sun shining through a gap in my curtains and filled the kettle. It is the first day of British Summer Time today, and as my coffee boiled I set the time one hour ahead on the analogue clock in my kitchen and looked forward to the lighter evenings.

It was a bright day in April and the clocks were striking one-eighth multiplied by ninety-six over two.
You would be forgiven for forgetting, or not even noticing, that today was the day the clocks spring forward, as most of our smartphones and most modern computers will automatically account for daylight savings time.

Those of us with a few retro computers in our collection would, however, spend some time today making sure that all our older devices are at the same time as the newer ones.

Setting the time on my BBC Master 128
The BBC micro has a battery-powered clock. It is advisable to change the batteries every couple of years, and certainly, check that they haven't leaked all over the inside of the motherboard during its time forgotten in your attic. The time is set via a simple BASIC statement, as shown.

Analogue clock for the BBC 128 Microcomputer (I actually use this quite a lot)


The disk utilities in DOS running on my IBM PS1
DOS has a similar command line, or you can use the utility built into the operating system.

Mmmm.... DOS!
Nothing says 'daylight savings' quite like an ASCII clock!
For RISCOS on my Raspberry Pi, I have a time setting utility that was originally built on the BBC Master. Here is it doing its thing.

RISCOS Raspberry Pi having the time set to match the PC shown above.

The Acorn Pocket Book II has an option in the 'Time' app to allow you to manually indicate summer time or not. Presumably, so you could set the time for any location on Earth. This may prove to be incredible foresight from Acorn if the United Kingdom chooses to abolish daylight savings in the near future, as I truly expect my Pocket Book to be soldiering on long after the modern laptop I am writing this post on has gone to the recycling plant in the clouds.

Well, that's all from my classic computer collection. This post was just an excuse to show off my various retro machines.

If you liked this post then there is a slim chance you would like this post about my thoughts on date formats and why you are probably getting them wrong, or this post about particle Art. Maybe you are just curious to know what this link does.


Life hack 004

How do you remember the number of days in a month?

Do you just know it? Do you recite a poem to help you? Do you consult your calendar?

I use the following method.

Hold your hands out palms facing up and put your little (pinky) fingers together. Now recite the months in order starting with the index finger of your left hand. Move alternatively from the tips of your fingers to the area between each finger where two fingers join your hand. When you reach the little (pinky) finger of your left hand then you should have counted 'July' and moved on to the little finger of your right hand and counted 'August'.

Every time a month corresponds to the tip of your finger, then this month has 31 days. All the others either have 30 days, or is February, and you just need to remember that February is special.

Image credit: Evan Amos licensed under the Creative Commons Attribution-Share Alike 3.0 Unported 

More life hacks

You're writing dates wrong, probably

I've been having this argument with people recently. We write dates wrong.  Here's why:

Today is the 18th day of the second month of 2017 (unless of course, you are reading this in the future, in which case, how long did you have to wait for hover-skateboards and what do teleporters feel like, and does anybody in the future remember those couple of months when American had President Trump?).

Most people will say that today's date is "The 18th of February 2017" and will sign documents with digits 18/2/17, or 18/02/17 (or if in America, the even more horrible 02/18/17).  The problem is of course the confusion here as to what the digits mean. Is it the 18th day, or the 2nd day, or the 17th day of the 18th month of year 2....?

When you stop to think about it, writing dates in either British or American formats is deeply confusing and fundamentally illogical.

Much better to write the date as 2017-02-18.

That's YYYY-MM-DD.

There are a number of reasons for this.  Firstly, documents date stamped in this way will automatically be sorted into chronological order. Someone sent me a document today from a recent meeting. The filename was DD MM YY. I can only imagine what a mess their 'my documents' folder looks like. Perhaps they like having all files written on the first day of every month next to each other? Or maybe they are The Doctor, from Doctor Who? You see, time is not a big ball of wibbly-wobbly timey-wimey 'stuff'. It is a strict line.

Fun, but wrong!
Secondly, we have always written time in the same way. Currently, looking at my clock, it is 11:47 in the morning. My accurate clock tells me that it is 12 seconds into the 47th minute.  That is 11:47:12, or HH:mm:ss.  That means that the current position in time could be written as:


2017-02-18 11:47:12

Notice that the largest unit of time is on the left. As you move through the digits, the units of time become progressively smaller, from years to months to days to hours to minutes.

Is there anywhere else that we also apply this logic?  Consider the number "three hundred and forty nine".

It would seem logical to write this as "349", with the largest unit on the left, getting progressively smaller.  It would be very silly to write it as "493", or even "49 and 300", or "four hundred minus fifty-one".

How about your postal address? You probably also write it in order of size:

Little person
Some house
A Street
In a little town
County
Country
Your massive planet

Of course, I am only talking about written dates here. I think it is perfectly acceptable to say "Saturday the eighteenth of February", or "it is nearly ten past two" in spoken English.

In fact, you shouldn't be surprised to discover that there is an international standard for date formats (and it makes incredible sense to adopt it all in written documents). It is basically what I have been banging on about in this rant.

No longer should you accept the problem of interpreting a date written as 04/05/11 as being the fifth of April in the late Roman period, or possibly the eleventh of May, or possibly April, in, um, in year 4, or maybe 5. Oh, my brain!

Right now! I mean, just then....no, it's gone.

If you enjoyed this rant, then you probably want to take a long hard look at yourself, however you might also like to read about why Americans drive on the wrong side of the road or perhaps you would like these articles about calendars.

See you for some more nerdy stuff in the future......

Day clock page

Following on from yesterday's Dementia Day Clock, I decided to create a new Day Clock with a little more information - for instance - accurate time.

Day clock on my Lumia 950. Click the image to load the new Day Clock.

I managed to export the data from the Perpetual Calendar for the BBC microcomputer using BeebEm and then wrote a script to convert the data from a BBC text file into a JSON file. The data contains the dates of various interesting anniversaries, and so I thought it would be a nice touch to show these on the new day clock, including a calculation of how long ago the event took place.  For example today is the 41 year anniversary of the UK Sex Discrimination Act 1975.

BeebEm has some really useful tools, most notably the 'export' function which allows you to export one or more files from a BBC disk image to a PC format. This means that I can code a file on the BBC microcomputer, but still access or edit it on my Windows 10 machine. Yay!

I then added in 'red-letter' days, or other recurring events including holidays and Pagan festivals (from Pagan Calendar). I cannot be absolutely sure I haven't made any errors here, but I'll keep checking that this works and then add some more date/time information as and when.

The final touch was to put the current time into the new page tab so you can check the time in your list of browser tabs without navigating back to the page.

Well that's it for now. In the future I may add some other features, perhaps a background image that changes with each passing month. Maybe I shall put a Google search box in, or other widgets such as weather. Maybe I'll just sack it off and build something else.


Come back soon for more nerdy stuff.

If you liked this post, then you might also like to watch some bouncing balls, or just play a game of Have Spell Will Travel.

Perpetual Calendar app updated to include Timely

I have updated my perpetual calendar app for the BBC Master Computer.  It now includes the "Timely" app which I discussed in a previous post.

DOWNLOAD the SSD file for your BBC Master or Emulator.

The perpetual calendar (running in the emulator) showing a view of the 19th June 2019.

The full suite of programs now offers the following features:


  • A perpetual calendar which is good for the next hundred years or more, including dates of Easter, up to 365 custom recurring events or one-off calendar events.
  • A clock (available in both calendar, and "Timely" modes).
  • A timer (counts upwards in seconds).
  • A countdown (counts down in seconds).
  • Up to 6 alarms (which can be saved and reused).
  • A CMOS clock reset utility (thanks to Beebug magazine).
  • Comprehensive documentation and a help system (does not work with second processor).

The "Timely" app running on vintage BBC Master Computer, showing a 20 minute countdown.
Machine code help routine.  Bring up a list of help topics with *H, or find a specific help topic with *H <topic> Unfortunately this feature will not work with the 6502 Co-processor.

If you are still awake then you might want to read other BBC Computer related posts, or just some random programming stuff.

Grrrrrr...!
#BBCComputer #BBCBASIC #Programming #perpetualcalendar #time #timer #countdown #calendar #teletext

Perpetual calendar version 1.4

I have updated my BBC Master calendar program.

Calendar running in the BeebEm emulator

The new features are:


  • 'Green letter day' - these are custom dates that you can set so they appear as green days in the calendar.  The dates are simply stored in a text file and you can add a single string of 38 characters to describe the event/day, for example "Auntie Maggie's birthday".  Dates can be set as either one-off events, or annual events.
  • The calendar automatically updates when the date changes in real time.  For example, if you are watching the calendar on the 30th November, late at night, the calendar will switch to 1st December at midnight.
  • Clock has been added. A simple depiction of the current time, which updates every five seconds.
  • Months in the future are depicted in green, and the past is depicted as red.
  • I have included an example data file (D.data) which includes some 'green letter days'.


In the future I may add the ability to add multiple events for each day.  I would have to change the underlying data structure so that events are stored as a linked-list, but I would also have to think about how the events all fit on the screen.

You can download the single-sided disc image for your BBC Master datacentre or for your emulator.

  • Hold <SHIFT> and press <BREAK> to load.  
  • To load the documentation: CH."docs".
  • The dates data file is D.data and should be edited in your text editor *EDIT D.data



Perpetual calendar

Today I wrote a Perpetual Calendar program for my BBC Master 128.

The calendar calculates the dates of Easter, as well as indicating the date of Christmas and Halloween.  Obviously, calculating the date of Easter was much harder(!)  I have managed to get somewhere with calculating the full moon phase as well, but I didn't quite finish this bit.

Perpetual calendar running in the BeebEm emulator, showing the date of Easter for 2017.  By the way, the date of Easter 2018 is 1st of April - NO JOKE!
I am grateful for the following contributions.  The basic calendar function was first published in BBC Acorn User magazine in July 1987, written by Paul Skirrow, and was published in their 'Hints and Tips' section.  I have modified it so that the calendar displays interesting days in colour. It also picks up the current date from the CMOS RAM, so this program will only run on a BBC Master 128, or otherwise a BBC computer fitted with an internal clock and battery.  You can emulate this in BeebEm, but it might struggle to pick up the correct date without some configuration.

The awesome teletext font first appeared in BBC Acorn User magazine in November 1990 and was written by Martin Osborne.

The current functionality allows you to skip forwards or backwards in time in steps of months or years using the cursor keys, or you can go to a specific month by pressing f0 (f10 in the emulator).

In future versions I would like to be able to enter 'red letter' days - ie let the user enter appointments, either recurring appointments like birthdays, or one-shot reminders for the dentist etc.  As it stands the program is only a rebuild of the existing perpetual calendar which I wrote about here.

You can download the SSD single-sided disc image here.  This will run in the BeebEm emulator, but you will get much better experience running it on vintage hardware using the DataCentre add on.

A sample of the help file supplied on the disc.

Label

World Karma Game