Go: package main

import (
	"bufio"
		"os"
	"strings"
	"strconv"
		"fmt"
)

var scanner = bufio.NewScanner(os.Stdin)

func main() {
	for scanner.Scan() {
		input := strings.Split(scanner.Text(), " ")
		ele_t1 := [3]int{}
		ele_t2 := [3]int{}
		for i := range ele_t1 {
			ele_t1[i], _ = strconv.Atoi(input[i])
			ele_t2[i], _ = strconv.Atoi(input[i+3])
		}
		if ele_t1[0] < 0 || ele_t1[1] < 0 || ele_t1[2] < 0 ||
			ele_t2[0] < 0 || ele_t2[1] < 0 || ele_t2[2] < 0 {
				break
		}
		// t1 := time.Date(ele_t1[0], time.Month(ele_t1[1]), ele_t1[2], 0, 0, 0, 0, time.UTC)
		// t2 := time.Date(ele_t2[0], time.Month(ele_t2[1]), ele_t2[2], 0, 0, 0, 0, time.UTC)
		// diff := t2.Sub(t1)
		// fmt.Printf("%v\n", int64(diff/(time.Hour*24)))
		fmt.Println(ut2jd(ele_t2[0], ele_t2[1], ele_t2[2])-ut2jd(ele_t1[0], ele_t1[1], ele_t1[2]))
	}
}

func ut2jd(year, month, day int) int {
	if month <= 2 {
		year--
		month += 12
	}
	s := 3 + year/4 - year/100 + year/400
	s += 1720994 + year*365 + (month+1)*30 + (month+1)*3/5 + day
	return s
}

C++: #include <iostream>
#include <stdio.h>
using namespace std;

int mc[12]={0,31,59,90,120,151,181,212,243,273,304,334};

long long dat(int y,int m,int d) {
	long long an;
	an=y*365+mc[m-1]+d+y/4-y/100+y/400;
	if (((y % 4==0 && y % 100!=0) || y % 400==0) && m<3) an--; 
	return an;
}

int main() {
    int y1,m1,d1,y2,m2,d2;
	long long d;
	while (cin >> y1 >> m1 >> d1 >> y2 >> m2 >> d2) {
		if (y1<0 || m1<0 || d1<0 || y2<0 || m2<0 || d2<0) break;
		d=dat(y2,m2,d2)-dat(y1,m1,d1);
		cout << d << endl;
	}
    return 0;
}

C++: #include <iostream>
using namespace std;

int f(int y,int m,int d){
	const int year = 365;
	int month[] = {31,28,31,30,31,30,31,31,30,31,30,31},c;
	c = 0;
	for(int i = 1;i < y;++i){
		c += year;
		if(i % 100 == 0){ 
			if(i % 400 == 0) ++c;
		}
		else if(i % 4 == 0) ++c; 
	}
	for(int i = 0;i < m - 1;++i){
		c += month[i];
		if(i == 1){
			if(y % 100 == 0){
				if(y % 400 == 0) ++c;
			}
			else if(y % 4 == 0) ++c;
		}
	}
	c += (d - 1);
	return c;
}

int main(){
	int y1,m1,d1,y2,m2,d2;
	while(cin >> y1 >> m1 >> d1 >> y2 >> m2 >> d2,d1 > 0){
		cout << f(y2,m2,d2) - f(y1,m1,d1) << endl;
	}
	return 0;
}

C++: #include<iostream>
#include<cstring>
#include<ctime>
using namespace std;
class Date{
	int y, m ,d;
public:
	bool GetDate(){
		cin >> y >> m >> d;
		if( y < 0 || m < 0 || d < 0 ) return false;
		else return true;
	}
	bool isLeap() const {
		return isLeap( y );
	}
	static bool isLeap(int y){
		return ( y % 4 == 0 && ( y % 100 != 0 || y % 400 == 0 ) );
	}
	unsigned int days() const {
		unsigned int ret = 0;
		const int md[] = {0,31,28,31,30,31,30,31,31,30,31,30,31};
		for(int ty = 0; ty < y; ++ty){
			ret += isLeap( ty ) ? 366 : 365;
		}
		for(int tm = 1; tm < m; ++tm){
			ret += (isLeap() && tm == 2) ? 29 : md[tm];
		}
		ret += d;
		return ret;
	}
	unsigned int operator-(const Date &t) const {
		return this->days() - t.days();
	}
};
int main(void){
	while( true ){
		Date date1, date2;
		if( !date1.GetDate() || !date2.GetDate() )
			break;
		
		cout << date2 - date1 << '\n';
	}
	return 0;
}

C++: #include<iostream>

bool isleap( int y )
{
	return ( y % 4 == 0 && y % 100 != 0 ) || y % 400 == 0;
}

int calc( int y, int m, int d )
{
	int ret = 0;

	for( int i = 0; i <= y; ++i )
	{
		for( int j = 1; j <= ( i == y ? m : 12 ); ++j )
		{
			if( i == y && j == m )
				ret += d;
			else if( j == 2 )
				ret += 28 + isleap( i );
			else if( j == 4 || j == 6 || j == 9 || j == 11 )
				ret += 30;
			else
				ret += 31;
		}
	}

	return ret;
}

int main()
{
	int y[2], m[2], d[2];
	while( true )
	{
		for( int i = 0; i != 2; ++i )
			if( !( std::cin >> y[i] >> m[i] >> d[i] ) || y[i] < 0 || m[i] < 0 || d[i] < 0 )
				return 0;

		std::cout << calc( y[1], m[1], d[1] ) - calc( y[0], m[0], d[0] ) << std::endl;
	}

	return 0;
}

C++: #include <iostream>

using namespace std;

int main(){
  int y1,m1,d1,y2,m2,d2;
  int month[13] = {0,31,28,31,30,31,30,31,31,30,31,30,31};
  for(int i=0;i<12;i++)
    month[i+1] += month[i];

  while(true){
    cin >> y1 >> m1 >> d1 >> y2 >> m2 >> d2;
    if (y1==-1)
      break;
    int day=0;
    day += d2-d1+month[m2-1]-month[m1-1]+(y2-y1)*365;
    if(m2<3)
      y2--;
    if(m1>2)
      y1++;
    day += y2/4-(y1-1)/4-y2/100+(y1-1)/100+y2/400-(y1-1)/400;
    cout << day << endl;
  }
  return 0;
}

C++: #include <iostream>
using namespace std;

struct date {
    int y, m, d;
};

int month[13] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};

bool isUru(int n) {
    return (n % 4 == 0 && (n % 100 || n % 400 == 0));
}

int main() {
    date d, e;
    while (true) {
        cin >> d.y >> d.m >> d.d >> e.y >> e.m >> e.d;
        if (d.y < 0 || d.m < 0 || d.d < 0 || e.y < 0 || e.m < 0 || e.d < 0) return 0; 
        int count = 0;
        if (e.y - d.y > 1) {
            count += (e.y - d.y - 1) * 365;
        }
        if (d.y == e.y) {
            for (int i = d.m + 1; i < e.m; i++) {
                count += month[i];
            }
        } else {
            for (int i = d.m + 1; i < 13; i++) {
                count += month[i];
            }
            for (int i = 1; i < e.m; i++) {
                count += month[i];
            }
        }
        if (d.y < e.y || d.m < e.m) {
            count += month[d.m] - d.d + 1;
            count += e.d - 1;
        } else {
            count += e.d - d.d;
        }

        if (d.m < 2 && isUru(d.y)) {
            count++;
        }
        if (e.m >= 2 && isUru(e.y)) {
            count++;
        }
        for (int i = d.y + 1; i < e.y; i++) {
            if (isUru(i)) count++;
        }
        cout << count << endl;
    }
}

C++: #include <iostream>

using namespace std;

class Data{
	public:
	int y;
	int m;
	int d;
};

int getday(int y, int m, int d){
	int ret=0;
	
	for(int i=0;i<y;i++){
		if((i%4==0 && i%100 != 0) || i%400 == 0){
			ret += 366;
		}else{
			ret += 365;
		}
	}
	
	for(int i=1;i<m;i++){
		if(i == 1 || i == 3 || i == 5 || i == 7 || i == 8 || i == 10 || i == 12){
			ret += 31;
		}else if(i==2){
			if((y%4==0 && y%100 != 0) || y%400 == 0){
				ret += 29;
			}else{
				ret += 28;
			}
		}else{
			ret += 30;
		}
	}
	ret += d;
	return ret;
}

int main(void){
	Data d1, d2;
	
	while(cin >> d1.y >> d1.m >> d1.d >> d2.y >> d2.m >> d2.d){
		if((d1.y|d1.m|d1.d|d2.y|d2.m|d2.d) & 1 << 31) break;
		
		cout << getday(d2.y,d2.m,d2.d) - getday(d1.y,d1.m,d1.d) << endl;;
	}
}

C++: #include<cstdio>
#include<iostream>
#include<map>
using namespace std;
inline bool check(int year) {
	return year % 400 == 0 || (year % 4 == 0 && year % 100 != 0);
}
int cnt(int year) {
	int ans = 0;
	for(int i = 1; i <= year; i++) {
		if(check(i)) ans++;
	}
	return ans;
}
int main() {
	int d[] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
	for(int i = 2; i <= 12; i++) {
		d[i] += d[i-1];
	}
	int y1,m1,d1,y2,m2,d2;
	while(scanf("%d%d%d%d%d%d",&y1,&m1,&d1,&y2,&m2,&d2)) {
		if(y1 == -1 || m1 == -1 || d1 == -1 || y2 == -1 || m2 == -1 || d2 == -1) break;
		int a1 = 365 * (y1 - 1) + cnt(m1 > 2 ? y1 : y1 - 1) + d[m1-1] + d1;
		int a2 = 365 * (y2 - 1) + cnt(m2 > 2 ? y2 : y2 - 1) + d[m2-1] + d2;
		printf("%d\n",a2 - a1);
	}
	
	return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <iomanip>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <numeric>
#include <bitset>
#include <cmath>

static const int MOD = 1000000007;
using ll = long long;
using u32 = unsigned;
using u64 = unsigned long long;
using namespace std;

template<class T> constexpr T INF = ::numeric_limits<T>::max()/32*15+208;

int main() {
    int a, b, c, d, e, f;
    auto get = [&](int y, int m, int d){
        if(m <= 2) y--, m += 12;
        return 365*y+y/4-y/100+y/400+306*(m+1)/10+d-428;
    };
    while(cin >> a >> b >> c >> d >> e >> f, ~a){
        cout << get(d, e, f) - get(a, b, c) << "\n";
    }
    return 0;
}