When is Philippines independent?

The Philippines was part of Spain until the Spanish/American War, when America gained the Philippines as a territory, then in 1946 they became an independent nation