37
5
Introduction
As is known, in 2017, Finland celebrates its 100 years of independence. To mark the occasion, it is your job to produce a Finnish flag for everyone's enjoyment.
Challenge
Create a program or a function that produces the flag of Finland (the grey border is there for presentation purposes only):
Flag specifications
- The ratio of the flag is
18:11
, with the cross being3
units thick, giving a horizontal ratio set of5:3:10
and a vertical ratio set of4:3:4
. - The picture must be at least
180 x 110
pixels in size, or in case of ASCII art,90 x 55
characters. - There is no official RGB colour for the blue, but use the closest approximation of
(0, 53, 128)
. If your system doesn't support RGB values, useblue
. - For the white colour, use RGB
(255, 255, 255)
orwhite
.
Not so fast
As drawing the Finnish national flag would be simpler than last year's Icelandic challenge, we'll have to ramp up the difficulty a bit. Given that Finland's Independence Day is on 6 December, the decimal number 100
must appear somewhere on the flag when the date in Finland (UTC+02:00) is 2017-12-06
or later (your code should not assume that the machine it's running on is set to a particular timezone). Before the date, the number must not be there. The number must be printed in black (RGB (0, 0, 0)
or black
) but its placement and font parameters are up to you.
An example of such a render (again, ignore the border):
For testing purposes, it would be nice to include two additional versions of your solution, one with a fixed date in the past and one in the future.
Rules
Standard loopholes are forbidden, as are built-in flag images/libraries. Also, your code must not take any input.
Finns don't like small talk, and this is code-golf, so don't waste characters!
Should we just use space and
#
in case of ASCII art? And then insert the characters100
somewhere? – Adám – 2017-12-04T09:26:17.4301Can we take the date in Finland as input for systems lacking an internal wall clock or not implementing the timezone? I'm occasionally posting answers in GFA-Basic (Atari ST, no timezone) or CP-1610 assembly (Intellivision, no date/time at all) and we have answers on some other old-school platforms from time to time which are usually pretty good at drawing things like that but seem to be disqualified here because of the date issue. – Arnauld – 2017-12-04T16:01:26.447
1@Arnauld: Gosh, I never thought anyone would use such systems. I appreciate your predicament but would that leave others at a disadvantage? I think allowing the input would leave you with just a simple integer comparison. Would a non-competing entry without the time aspect be out of the question? – Antti29 – 2017-12-04T16:39:49.387
1@Antti29 Honestly, I can't think of any good solution and it's too late to do any major update to the rules. Unless someone comes with a really satisfying suggestion, I think these systems simply cannot compete here. (I saw the challenge in the sandbox and didn't think about that. My bad.) – Arnauld – 2017-12-04T16:49:55.167
9
Is the other Finnish flag allowed?
– Justin – 2017-12-04T23:58:35.830Funny that this disqualifies PostScript... there are no dates in PostScript, so it's impossible to what you ask. – wvxvw – 2017-12-05T12:07:39.530
@Arnauld (cc Antti29) a compromise for languages without a built-in clock would be to give the program a time and a corresponding time zone as input. That would put those languages exactly where others are, i.e. they can get the current time, but they don't know what time zone it's in and need to convert it appropriately. – Martin Ender – 2018-02-20T14:27:47.593