This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 名前 : Nia Tomonaka | |
// Twitter : https://twitter.com/nia_tn1012 | |
#include <stdio.h> | |
#include "DxLib.h" | |
// Zellerの公式でddの1日目の曜日を求めます。 | |
int Zeller( DATEDATA& dd ) { | |
return ( dd.Year + dd.Year / 4 - dd.Year / 100 + dd.Year / 400 + ( 13 * dd.Mon + 8 ) / 5 + 1 ) % 7; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 名前 : Nia Tomonaka | |
// Twitter : https://twitter.com/nia_tn1012 | |
#include <windows.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <tchar.h> | |
#define MAX_LOADSTRING 100 | |
TCHAR szTitle[MAX_LOADSTRING] = _T( "Calendar" ); // タイトル バーのテキスト |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 名前 : Nia Tomonaka | |
// Twitter : https://twitter.com/nia_tn1012 | |
using System; | |
namespace NiaTN1012_Cal { | |
class Program { | |
static void Main( string[] args ) { | |
// 現在の日付を取得から当月1日を表すインスタンスを生成します。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 名前 : Nia Tomonaka | |
// Twitter : https://twitter.com/nia_tn1012 | |
using System; | |
using Windows.UI; | |
using Windows.UI.Xaml.Controls; | |
using Windows.UI.Xaml.Media; | |
namespace WSAPP { | |
// カレンダー用オブジェクトです。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 名前 : Nia Tomonaka | |
# Twitter : https://twitter.com/nia_tn1012 | |
window.onload = () -> | |
# 現在日を取得し、当月1日の曜日と末日を求めます。 | |
now = new Date() | |
prePad = new Date( now.getFullYear(), now.getMonth(), 1 ).getDay() | |
lastDay = new Date( now.getFullYear(), now.getMonth() + 1, 0 ).getDate() | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 名前 : Nia Tomonaka | |
-- Twitter : https://twitter.com/nia_tn1012 | |
-- 使用するライブラリの宣言 | |
-- 入出力 | |
with Ada.Text_IO, Ada.Integer_Text_IO; use Ada.Text_IO; | |
-- カレンダー(但し、他の言語でいう日付ライブラリみたいなものです) | |
with Ada.Calendar, Ada.Calendar.Formatting, Ada.Calendar.Time_Zones; | |
use Ada.Calendar, Ada.Calendar.Formatting, Ada.Calendar.Time_Zones; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 名前 : Nia Tomonaka | |
// Twitter : https://twitter.com/nia_tn1012 | |
import java.applet.Applet; | |
import java.awt.Color; | |
import java.awt.Graphics; | |
import java.util.Calendar; | |
import java.util.Locale; | |
public class AppletCalendar extends Applet { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 分離コードです。主役はXAMLです。 | |
using System.Windows.Controls; | |
namespace Silverlight { | |
public partial class MainPage : UserControl { | |
public MainPage() { InitializeComponent(); } | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
名前 : Nia Tomonaka | |
Twitter : https://twitter.com/nia_tn1012 | |
--> | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Calendar on Razor ( C# )</title> | |
</head> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 名前 : Nia Tomonaka | |
// Twitter : https://twitter.com/nia_tn1012 | |
import ceylon.time { Date, date, today } | |
"Run the module `calendar`." | |
shared void run() { | |
// 現在日を取得し、当月1日の曜日と月末日を求めます。 | |
Date now = today(); variable String wl = ""; // wlはカレンダー出力用文字列変数です。 | |
value prePad = date( now.year, now.month, 1 ).dayOfWeek.integer; // 日曜日0始まりです。 |