|Perl Monk, Perl Meditation|
With the aid of a PC connected GPS, and some fairly well defined celestial mechanics math, determining the time of Sunset and Sunrise at any given location isn't that hard.
Though you would probably need a missile guidance system style local topology map to account for things like local mountain ranges etc. Depending where you live these may exist, but probably aren't avaiable to the general public.
Accounting for refraction and backscatter of light due to the atmosphere will be very difficult as it will be affected by the presence, type and hieght of cloud cover upto several hundred miles from the target location.
Given enough incentive, determining when the last vestiges of Sunlight will cease to fall on a given point on the earths surface would probably be possible, to a fairly high degree of accuracy.
However, whether this would difinitively capture the etheral notion of evening I doubt. What constitutes the start and end of evening is very much determined by a whole range of factors well beyond the scope of any form of mathematical formulea to define.
One example of these factors is social background: Different societies, and different groups of people within any given society, and even the age group of people can have an influence upon whether evening starts at 4pm, 6 pm or 8 pm or any point in between. Even once a computer calculated a specific point as the StartOfEvening, the percived accuracy of the determination would vary depending upon the audience, and may even vary with the same person according to a number of factors. Personally, Sunday Evening notionally starts later in the day -- as defined by my local time including artificial factors like daylight saving time -- than a work day evening. Likewise, evenings seem to start later, or the "afternoon" continues longer, when I am on holiday.
There are many concepts in the real world that do not lend themselves to being viewed as objects, nor even attributes of objects. The question then becomes one of:
Do these concepts have any place in computer programs?
We can represent colours within a computer program more accurately than most human eyes can differenciate between them, even with 24-bits. However, writing a computer program that could quantify any given colour as a "nice colour" would be extremely difficult. Or even a pair of colours as having a "good contrast" or as "complementary" in the fashion designer sense of the terms.
But then, what would be the purpose of having a computer program to do this? A computerised critique of the stars dress choices at red carpet parades?
For exactly the same reasons as it is difficult to produce a computer program to perform these tasks, anything said, or written, has to be taken in the context of where and when it was written. Taking individual words and phrases and ideas, expressed in one context and then considering their merits in isolation from the original context is fraught with problems.