Go: package main

import (
	"bufio"
		"os"
	"strings"
	"strconv"
	"time"
	"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)))
	}
}

Python: import datetime as D
while 1:
  a,b,c,d,e,f=map(int,raw_input().split())
  try: print (D.date(d,e,f)-D.date(a,b,c)).days
  except: break

Python: import datetime as D
while 1:
  a,b,c,d,e,f=x=map(int,raw_input().split(" "))
  if any(map(lambda i:i<0,x)): break
  print (D.date(d,e,f)-D.date(a,b,c)).days

Python: from datetime import datetime
while True:
    y1,m1,d1,y2,m2,d2 = map(int,raw_input().split())
    if any(i<0 for i in (y1,m1,d1,y2,m2,d2)):
        break
    print (datetime(y2,m2,d2) - datetime(y1,m1,d1)).days

Python: import datetime

while True:
    y1,m1,d1,y2,m2,d2=[int(i) for i in input().split(" ")]
    if y1==-1:
        break
    d1=datetime.datetime(y1,m1,d1)
    d2=datetime.datetime(y2,m2,d2)
    print((d2-d1).days)

Python: import datetime
while True:
    ymd  = map(str, raw_input().split())
    if (ymd[0] == '-1'):
        break
    d1 = ":".join(ymd[:3])
    d2 = ":".join(ymd[3:])
    t1 = datetime.datetime.strptime(d1, "%Y:%m:%d")
    t2 = datetime.datetime.strptime(d2, "%Y:%m:%d")
    print (t2 - t1).days

Python: import datetime
while True:
    y1,m1,d1,y2,m2,d2=map(int,raw_input().split())
    if y1==m1==d1==y2==m2==d2==-1:break
    a=datetime.datetime(y1,m1,d1)
    b=datetime.datetime(y2,m2,d2)
    print (b-a).days

Python: import datetime
while 1:
  y1,m1,d1,y2,m2,d2=map(int,raw_input().split(" "))
  if y1==m1==d1==y2==m2==d2==-1: break
  a=datetime.date(y1,m1,d1)
  b=datetime.date(y2,m2,d2)
  print (b-a).days

Python: import datetime as D
while 1:
  a,b,c,d,e,f=map(int,raw_input().split(" "))
  try: print (D.date(d,e,f)-D.date(a,b,c)).days
  except: break

Python: import datetime

str = raw_input()
while True:
    str = str.split()
    num = []
    for s in str:
        num.append(int(s))
    if num[0] < 0:
        break
    
    d1 = datetime.date(num[0], num[1], num[2])
    d2 = datetime.date(num[3], num[4], num[5])
    print (d2 - d1).days
    str = raw_input()

Python: import datetime

while True:

    year1, month1, day1, year2, month2, day2 = [int(item) for item in input().split(" ")]

    if any([item < 0 for item in [year1, month1, day1, year2, month2, day2]]):
        break

    date1 = datetime.date(year1, month1, day1)
    date2 = datetime.date(year2, month2, day2)

    subtract = date2 - date1

    print(subtract.days)

Python: # -*- coding: utf-8 -*-
"""
http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0125
"""
import sys
from datetime import timedelta, date


def solve(data):
    y1, m1, d1, y2, m2, d2 = data
    date1 = date(y1, m1, d1)
    date2 = date(y2, m2, d2)
    delta = date2 - date1
    return delta.days


def main(args):
    while True:
        data = [int(x) for x in input().split()]
        try:
            result = solve(data)
            print(result)
        except ValueError:
            break


if __name__ == '__main__':
    main(sys.argv[1:])

C++: #include <iostream>
#include <cstdio>
#include <algorithm>

using namespace std;

int days[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};

// 1??´1???1??\???????????\??°
long long int day_sum(int y, int m, int d){
	long long int ans;
	ans = 0;
	
	y--;
	
	ans += y * 365;
	ans += (y / 4 - y / 100 + y / 400);
	
	for(int i = 0; i < m - 1; i++){
		ans += days[i];
	}
	ans += d - 1;
	if(((y % 4 == 0) * 2 - 1) * ((y % 100 == 0) * 2 - 1) * ((y % 400 == 0) * 2 - 1) < 0){
		if(m >= 3){
			ans++;
		}
	}
	return ans;
}

int main(){
	
	int y1, m1, d1, y2, m2, d2;
	while(true){
		cin >> y1 >> m1 >> d1 >> y2 >> m2 >> d2;
		if(y1 < 0 || m1 < 0 || d1 < 0 || y2 < 0 || m2 < 0 || d2 < 0){
			break;
		}
		printf("%lld\n", day_sum(y2, m2, d2) - day_sum(y1, m1, d1));
	}
	
	return 0;
}

C++: #include <bits/stdc++.h>

using namespace std;
using ll = long long;
using pii = pair<int, int>;

struct Day {
  int y, m, d;
  Day(int y = 0, int m = 0, int d = 0) : y(y), m(m), d(d) {}
};
istream& operator >> (istream& is, Day& day) {
  return is >> day.y >> day.m >> day.d;
}
ostream& operator << (ostream& os, Day& day) {
  return os << day.y << " " << day.m << " " << day.d;
}
bool operator < (const Day& lhs, const Day& rhs) { return lhs.y != rhs.y ? lhs.y < rhs.y : lhs.m != rhs.m ? lhs.m < rhs.m : lhs.d < rhs.d; }
bool operator == (const Day& lhs, const Day& rhs) { return lhs.y == rhs.y && lhs.m == rhs.m && lhs.d == rhs.d; }
bool operator != (const Day& lhs, const Day& rhs) { return !(lhs == rhs); }

int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(false);
  cout << fixed << setprecision(10);
  
  const int days[13] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
  auto is_leap = [&](int y) { return y % 400 == 0 || (y % 100 != 0 && y % 4 == 0); };
  Day s, t;
  while (cin >> s >> t, s.y != -1) {
    int ans = 0;
    while (s != t) {
      bool leap = is_leap(s.y);
      if (s.d + 1 > days[s.m] + (s.m == 2 && leap)) {
        if (s.m + 1 > 12) s.y++, s.m = 1, s.d = 1;
        else s.m++, s.d = 1;
      } else s.d++;
      ans++;
    }
    cout << ans << endl;
  }

  return 0;
}

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

int p[] = {0,31,28,31,30,31,30,31,31,30,31,30,31};
int y2,m2,d2;

bool leap(int y){

  if(y%400 == 0) return true;
  if(y%100 == 0) return false;
  if(y%4 == 0) return true;
  return false;

}

int solve(int y, int m, int d){

  if(y == y2 && m == m2 && d == d2) return 0;

  if(leap(y) && m == 2 && d == 28) return solve(y,3,1)+2;
  else if(m == 12 && d == 31) return solve(y+1,1,1)+1;
  else if(p[m] == d) return solve(y,m+1,1)+1;
  else return solve(y,m,d+1)+1;

}

int main(){

  int y,m,d;

  while(true){
    cin >> y >> m >> d >> y2 >> m2 >> d2;
    if(y < 0 || m < 0 || d < 0 || y2 < 0 || m2 < 0 || d2 < 0) break;

    cout << solve(y, m, d) << endl;
  }

}

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

bool uru(int y){
  if(!(y%400))return true;
  if(!(y%100))return false;
  if(!(y%4))return true;
  return false;
}

int day(int y, int m, int d){
  int res = 0;
  int month[] = {31,0,31,30,31,30,31,31,30,31,30};

  for(int i=0;i<y;i++){
    if(uru(i))res += 366;
    else res += 365;
  }

  for(int i=0;i<m-1;i++)res += month[i];
  if(m>2){
    if(uru(y))res += 29;
    else res += 28;
  }

  res += d;
  return res;
}

  

int main(){
  int y1,y2,m1,m2,d1,d2;

  while(1){
    cin >> y1 >> m1 >> d1 >> y2 >> m2 >> d2;
    if(y1<0 || m1<0 || d1<0 || y2<0 || m2<0 || d2<0)break;

    int s1,s2;
    s1 = day(y1,m1,d1);
    s2 = day(y2,m2,d2);
    cout << s2 - s1 << endl;
  }
}