<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">function calendar_icon(datetime,short_days) {
    var locale = "en-US";
	var xmlns  = "http://www.w3.org/2000/svg";
	var role   = "img";
    var months = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'];
    var days   = short_days ? ['Sun','Mon','Tue','Wed','Thu','Fri','Sat'] : ['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'];
    
	this.date_svg = function(size) {
		var aria_label  = "Date";
		var viewBox     = "0 0 512 512";
		var width       = (size == undefined) ? "80px" : size;
		var height      = (size == undefined) ? "80px" : size;
		var svg		    = document.createElementNS("http://www.w3.org/2000/svg", "svg");
		var path0       = document.createElementNS("http://www.w3.org/2000/svg", "path");
		var path1       = document.createElementNS("http://www.w3.org/2000/svg", "path");
		var group       = document.createElementNS("http://www.w3.org/2000/svg", "g");
		var monthtext   = document.createElementNS("http://www.w3.org/2000/svg", "text");
		var daytext     = document.createElementNS("http://www.w3.org/2000/svg", "text");
		var weekdaytext = document.createElementNS("http://www.w3.org/2000/svg", "text");
		var circles     = [];

		// svg.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:xlink", "http://www.w3.org/1999/xlink");
		svg.setAttribute("xmlns",xmlns);
		svg.setAttribute("aria-label",aria_label);
		svg.setAttribute("role",role);
		svg.setAttribute("viewBox",viewBox);
		svg.setAttribute("width",width);
		svg.setAttribute("height",height);

		path0.setAttribute("d","M512 455c0 32-25 57-57 57H57c-32 0-57-25-57-57V128c0-31 25-57 57-57h398c32 0 57 26 57 57z");
		path0.setAttribute("fill","#e0e7ec");
		path0.setAttribute("stroke","#000000");
		path0.setAttribute("stroke-width","10");
		path1.setAttribute("d","M484 0h-47c2 4 4 9 4 14a28 28 0 1 1-53-14H124c3 4 4 9 4 14A28 28 0 1 1 75 0H28C13 0 0 13 0 28v157h512V28c0-15-13-28-28-28z");
		path1.setAttribute("fill","#dd2f45");
		path1.setAttribute("stroke","#000000");
		path1.setAttribute("stroke-width","10");

		group.setAttribute("fill","#f3aab9");

		for(var ii=0;ii&lt;6;ii++) {
			circles[ii] = document.createElementNS("http://www.w3.org/2000/svg", "circle");
			circles[ii].setAttribute("r",14);
			group.appendChild(circles[ii]);
		}

		circles[0].setAttribute("cx",470);
		circles[1].setAttribute("cx",470);
		circles[2].setAttribute("cx",427);
		circles[3].setAttribute("cx",427);
		circles[4].setAttribute("cx",384);
		circles[5].setAttribute("cx",384);

		circles[0].setAttribute("cy",142);
		circles[1].setAttribute("cy",100);
		circles[2].setAttribute("cy",142);
		circles[3].setAttribute("cy",100);
		circles[4].setAttribute("cy",142);
		circles[5].setAttribute("cy",100);

		monthtext.setAttribute("id","month");
		monthtext.setAttribute("x",32);
		monthtext.setAttribute("y",164);
		monthtext.setAttribute("fill","#fff");
		monthtext.setAttribute("font-family","monospace");
		monthtext.setAttribute("font-weight","bold");
		monthtext.setAttribute("font-size","140px");
		monthtext.setAttribute("style","text-anchor: left");
   	    monthtext.appendChild(document.createTextNode(months[datetime.getMonth()].toUpperCase()));

		daytext.setAttribute("id","day");
		daytext.setAttribute("x",256);
		daytext.setAttribute("y",400);
		daytext.setAttribute("fill","#66757f");
		daytext.setAttribute("font-family","monospace");
		daytext.setAttribute("font-weight","bold");
		daytext.setAttribute("font-size","256px");
		daytext.setAttribute("style","text-anchor: middle");
		daytext.appendChild(document.createTextNode(datetime.getDate()));
		
		weekdaytext.setAttribute("id","weekday");
		weekdaytext.setAttribute("x",256);
		weekdaytext.setAttribute("y",480);
		weekdaytext.setAttribute("fill","#66757f");
		weekdaytext.setAttribute("font-family","monospace");
		weekdaytext.setAttribute("font-weight","bold");
		weekdaytext.setAttribute("font-size","80px");
		weekdaytext.setAttribute("style","text-anchor: middle");
        weekdaytext.appendChild(document.createTextNode(days[datetime.getDay()]));
		
		svg.appendChild(path0);
		svg.appendChild(path1);
		svg.appendChild(group);
		svg.appendChild(monthtext);
		svg.appendChild(daytext);
		svg.appendChild(weekdaytext);

		return(svg);
	}

	this.time_svg = function() {
	    var aria_label = "Time";
	    var viewBox    = "0 0 512 256";
	    var width      = "80px";
	    var height     = "40px";
	    var svg        = document.createElementNS("http://www.w3.org/2000/svg", "svg");
	    var path       = document.createElementNS("http://www.w3.org/2000/svg", "path");
	    var timetext   = document.createElementNS("http://www.w3.org/2000/svg", "text");
	    var hours      = datetime.getHours();
	    var hours12    = (hours &gt; 12) ? hours-12 : ((hours == 0) ? 12 : hours);
	    var minutes    = datetime.getMinutes();
	    var pad        = (minutes.toString().length == 1) ? "0" : "";
	    var ampm       = (hours &lt; 12) ? "AM" : "PM";
	    var timestring = hours12+":"+pad+minutes+ampm;
	    
	    svg.setAttribute("xmlns",xmlns);
	    svg.setAttribute("aria-label",aria_label);
	    svg.setAttribute("role",role);
	    svg.setAttribute("viewBox",viewBox);
	    svg.setAttribute("width",width);
	    svg.setAttribute("height",height);

	    path.setAttribute("d","M 512,222.91157 C 512,241.48753 487,256 455,256 H 57 C 25,256 0,241.48753 0,222.91157 V 33.08843 C 0,15.09297 25,0 57,0 h 398 c 32,0 57,15.09297 57,33.08843 z");
	    path.setAttribute("fill","#e0e7ec");

	    timetext.setAttribute("id","time");
	    timetext.setAttribute("x",256);
	    timetext.setAttribute("y",164);
	    timetext.setAttribute("fill","#66757f");
	    timetext.setAttribute("font-family","monospace");
	    timetext.setAttribute("font-weight","bold");
	    timetext.setAttribute("font-size","112px");
	    timetext.setAttribute("style","text-anchor: middle");
	    timetext.appendChild(document.createTextNode(timestring));

	    svg.appendChild(path);
	    svg.appendChild(timetext);

	    return(svg);
	}
}
</pre></body></html>