93
96
* @brief Check patient's birthday
95
98
public bool check_date (int day, int month, int year) {
97
100
int[] thirtyone = {1, 3, 5, 7, 8, 10, 12}; // months of 31 day
99
102
if ( ((day == 31) && (month in thirtyone)) || ((day <= 30) && (month != 2)) || (day <= 28) )
102
105
if ( (day == 29) && (month == 2) ) {
103
106
// check if year is a leap year
111
114
public Gdk.Pixbuf pixbuf_from_svg_resource (string resource, int width, int height) {
113
116
var stream = GLib.resources_open_stream (resource, ResourceLookupFlags.NONE);