This file contains hidden or 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 hidden or 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 hidden or 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
#pragma once | |
#include "DxLib.h" | |
#include <vector> | |
// sourceの値が、targetのリストのいずれかとマッチするかどうかを判別します。 | |
bool AnyOneOfMatch( char source, std::vector<char> target ) { | |
bool ans = false; | |
std::vector<char>::iterator titer = target.begin(); | |
while( titer != target.end() ) { | |
if( source == *titer++ ) { |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 | |
Option Explicit | |
Sub Calendar() | |
' 現在の日付を取得します。 | |
Dim now As Date | |
now = Date | |
' 当月1日を表すインスタンスを生成します。 |
This file contains hidden or 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 "stdafx.h" | |
#include <stdio.h> | |
using namespace System; | |
int main( array<System::String ^> ^args ) { |
This file contains hidden or 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 | |
// 現在の日付と曜日を取得します。 | |
現在年 = ( システム ! 年? ). 現在月 = ( システム ! 月? ). 現在日 = ( システム ! 日? ). | |
現在曜日 = ( システム ! 曜日? ). | |
// 曜日を文字から数値( 日曜 : 0、月曜 : 1、・・・、土曜 : 6 )に変換します。 | |
「現在曜日 == "日"」 ! なら「現在曜日 = "0"」 | |
そうでなければ「「現在曜日 == "月"」 ! なら「現在曜日 = "1"」 |